Class InferenceVariable
java.lang.Object
com.github.javaparser.symbolsolver.resolution.typeinference.InferenceVariable
- All Implemented Interfaces:
ResolvedType
Are meta-variables for types - that is, they are special names that allow abstract reasoning about types.
To distinguish them from type variables, inference variables are represented with Greek letters, principally α.
See JLS 18
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate ResolvedTypeParameterDeclarationprivate static int -
Constructor Summary
ConstructorsConstructorDescriptionInferenceVariable(String name, ResolvedTypeParameterDeclaration typeParameterDeclaration) -
Method Summary
Modifier and TypeMethodDescriptiondescribe()booleaninthashCode()static List<InferenceVariable> instantiate(List<ResolvedTypeParameterDeclaration> typeParameterDeclarations) booleanisAssignableBy(ResolvedType other) This method checks if ThisType t = new OtherType() would compile.booleanbooleanmention(List<ResolvedTypeParameterDeclaration> typeParameters) Does this type mention at all, directly or indirectly, the given type parameters?toString()static InferenceVariableunnamed(ResolvedTypeParameterDeclaration typeParameterDeclaration) Methods inherited from interface ResolvedType
arrayLevel, asArrayType, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, erasure, isArray, isConstraint, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, replaceTypeVariables, replaceTypeVariables, solveGenericTypes, toDescriptor
-
Field Details
-
unnamedInstantiated
private static int unnamedInstantiated -
name
-
typeParameterDeclaration
-
-
Constructor Details
-
InferenceVariable
-
-
Method Details
-
instantiate
public static List<InferenceVariable> instantiate(List<ResolvedTypeParameterDeclaration> typeParameterDeclarations) -
unnamed
-
isInferenceVariable
public boolean isInferenceVariable()- Specified by:
isInferenceVariablein interfaceResolvedType
-
describe
- Specified by:
describein interfaceResolvedType
-
equals
-
hashCode
-
isAssignableBy
Description copied from interface:ResolvedTypeThis method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableByin interfaceResolvedType
-
getTypeParameterDeclaration
-
toString
-
mention
Description copied from interface:ResolvedTypeDoes this type mention at all, directly or indirectly, the given type parameters?- Specified by:
mentionin interfaceResolvedType
-