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
ConstructorsConstructorDescriptionInferenceSubstitution(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 TypeBindinggetP(int i) Get the type corresponding to the ith inference variable.booleanReturns true for raw substitutionprotected booleanisSameParameter(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:
substitutein 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:SubstitutionReturns the type substitute for a given type variable, or itself if no substitution got performed.- Specified by:
substitutein interfaceSubstitution
-
environment
Description copied from interface:SubstitutionReturns the lookup environment- Specified by:
environmentin interfaceSubstitution
-
isRawSubstitution
public boolean isRawSubstitution()Description copied from interface:SubstitutionReturns true for raw substitution- Specified by:
isRawSubstitutionin interfaceSubstitution
-