Class InferenceVariable
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.InferenceVariable
-
- All Implemented Interfaces:
com.github.javaparser.resolution.types.ResolvedType
public class InferenceVariable extends Object implements com.github.javaparser.resolution.types.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, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describe()
boolean
equals(Object o)
com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
getTypeParameterDeclaration()
int
hashCode()
static List<InferenceVariable>
instantiate(List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameterDeclarations)
boolean
isAssignableBy(com.github.javaparser.resolution.types.ResolvedType other)
boolean
mention(List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameters)
String
toString()
static InferenceVariable
unnamed(com.github.javaparser.resolution.declarations.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, isArray, isConstraint, isNull, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, replaceTypeVariables, replaceTypeVariables
-
-
-
-
Constructor Detail
-
InferenceVariable
public InferenceVariable(String name, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
-
Method Detail
-
instantiate
public static List<InferenceVariable> instantiate(List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameterDeclarations)
-
unnamed
public static InferenceVariable unnamed(com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
describe
public String describe()
- Specified by:
describe
in interfacecom.github.javaparser.resolution.types.ResolvedType
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.types.ResolvedType other)
- Specified by:
isAssignableBy
in interfacecom.github.javaparser.resolution.types.ResolvedType
-
getTypeParameterDeclaration
public com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration getTypeParameterDeclaration()
-
mention
public boolean mention(List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameters)
- Specified by:
mention
in interfacecom.github.javaparser.resolution.types.ResolvedType
-
-