Class InferenceSubstitution
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.Substitutor
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.InferenceSubstitution
- All Implemented Interfaces:
Substitution
A type variable substitution strategy based on inference variables (JLS8 18.1.1)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Substitution
Substitution.NullSubstitution
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.Substitutor
staticContext
-
Constructor Summary
ConstructorDescriptionInferenceSubstitution
(InferenceContext18 context) InferenceSubstitution
(LookupEnvironment environment, InferenceVariable[] variables, InvocationSite site) -
Method Summary
Modifier and TypeMethodDescriptionaddContext
(InferenceContext18 otherContext) Answer a substitution that is able to substitute into inference variables of several inference contexts (outer and inner)Returns the lookup environmentprotected TypeBinding
getP
(int i) Get the type corresponding to the ith inference variable.boolean
Returns true for raw substitutionprotected boolean
isSameParameter
(TypeBinding p1, TypeBinding originalType) substitute
(Substitution substitution, TypeBinding originalType) Override methodScope.Substitutor.substitute(Substitution, TypeBinding)
, to add substitution of types other than type variables.substitute
(TypeVariableBinding typeVariable) Returns the type substitute for a given type variable, or itself if no substitution got performed.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.Substitutor
substitute, substitute
-
Constructor Details
-
InferenceSubstitution
public InferenceSubstitution(LookupEnvironment environment, InferenceVariable[] variables, InvocationSite site) -
InferenceSubstitution
-
-
Method Details
-
addContext
Answer a substitution that is able to substitute into inference variables of several inference contexts (outer and inner) -
substitute
Override methodScope.Substitutor.substitute(Substitution, TypeBinding)
, to add substitution of types other than type variables.- Overrides:
substitute
in classScope.Substitutor
-
isSameParameter
-
getP
Get the type corresponding to the ith inference variable. Default behavior is to answer the inference variable's type parameter. Sub-class may override to substitute other types. -
substitute
Description copied from interface:Substitution
Returns the type substitute for a given type variable, or itself if no substitution got performed.- Specified by:
substitute
in interfaceSubstitution
-
environment
Description copied from interface:Substitution
Returns the lookup environment- Specified by:
environment
in interfaceSubstitution
-
isRawSubstitution
public boolean isRawSubstitution()Description copied from interface:Substitution
Returns true for raw substitution- Specified by:
isRawSubstitution
in interfaceSubstitution
-