public class TypeSubstitutions
extends java.lang.Object
Created by covers1624 on 2/5/22.
| Modifier and Type | Class and Description |
|---|---|
static interface |
TypeSubstitutions.TypeMapper |
static interface |
TypeSubstitutions.TypeParamMapper |
static interface |
TypeSubstitutions.TypeSubstApplier |
| Constructor and Description |
|---|
TypeSubstitutions() |
| Modifier and Type | Method and Description |
|---|---|
static Field |
applyOwnerParameterization(ParameterizedClass owner,
Field field)
Parameterize the given field.
|
static Method |
applyOwnerParameterization(ParameterizedClass owner,
Method method) |
static Method |
parameterize(ClassType owner,
Method method,
TypeSubstitutions.TypeParamMapper mapper)
Parameterize the given method.
|
static AType |
subst(AType type,
TypeSubstitutions.TypeMapper mapper)
Apply the substitutions given by the provided mapper recursively.
|
static ClassType |
subst(ClassType type,
TypeSubstitutions.TypeMapper mapper)
Apply the substitutions given by the provided mapper recursively.
|
static ReferenceType |
subst(ReferenceType type,
TypeSubstitutions.TypeMapper mapper)
Apply the substitutions given by the provided mapper recursively.
|
public static AType subst(AType type, TypeSubstitutions.TypeMapper mapper)
type - The input type.mapper - The TypeSubstitutions.TypeMapper.public static ReferenceType subst(ReferenceType type, TypeSubstitutions.TypeMapper mapper)
type - The input type.mapper - The TypeSubstitutions.TypeMapper.public static ClassType subst(ClassType type, TypeSubstitutions.TypeMapper mapper)
type - The input type.mapper - The TypeSubstitutions.TypeMapper.public static Field applyOwnerParameterization(ParameterizedClass owner, Field field)
owner - The owner of the field. (where it is declared)field - The field to parameterize.public static Method applyOwnerParameterization(ParameterizedClass owner, Method method)
public static Method parameterize(ClassType owner, Method method, TypeSubstitutions.TypeParamMapper mapper)
owner - The owner of the method. (where it is declared)method - The method to parameterize.mapper - The TypeSubstitutions.TypeMapper to apply.