Class InferenceVariable
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.InferenceVariable
-
- All Implemented Interfaces:
ResolvedType
public class InferenceVariable extends Object implements 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- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description InferenceVariable(String name, ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescribe()booleanequals(Object o)ResolvedTypeParameterDeclarationgetTypeParameterDeclaration()inthashCode()static List<InferenceVariable>instantiate(List<ResolvedTypeParameterDeclaration> typeParameterDeclarations)booleanisAssignableBy(ResolvedType other)booleanisInferenceVariable()booleanmention(List<ResolvedTypeParameterDeclaration> typeParameters)StringtoString()static InferenceVariableunnamed(ResolvedTypeParameterDeclaration typeParameterDeclaration)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.types.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
-
-
-
-
Constructor Detail
-
InferenceVariable
public InferenceVariable(String name, ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
-
Method Detail
-
instantiate
public static List<InferenceVariable> instantiate(List<ResolvedTypeParameterDeclaration> typeParameterDeclarations)
-
unnamed
public static InferenceVariable unnamed(ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
isInferenceVariable
public boolean isInferenceVariable()
- Specified by:
isInferenceVariablein interfaceResolvedType
-
describe
public String describe()
- Specified by:
describein interfaceResolvedType
-
isAssignableBy
public boolean isAssignableBy(ResolvedType other)
- Specified by:
isAssignableByin interfaceResolvedType
-
getTypeParameterDeclaration
public ResolvedTypeParameterDeclaration getTypeParameterDeclaration()
-
mention
public boolean mention(List<ResolvedTypeParameterDeclaration> typeParameters)
- Specified by:
mentionin interfaceResolvedType
-
-