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 java.lang.Object implements com.github.javaparser.resolution.types.ResolvedTypeAre 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(java.lang.String name, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescribe()booleanequals(java.lang.Object o)com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclarationgetTypeParameterDeclaration()inthashCode()static java.util.List<InferenceVariable>instantiate(java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameterDeclarations)booleanisAssignableBy(com.github.javaparser.resolution.types.ResolvedType other)booleanisInferenceVariable()booleanmention(java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameters)java.lang.StringtoString()static InferenceVariableunnamed(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, erasure, isArray, isConstraint, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, replaceTypeVariables, replaceTypeVariables, solveGenericTypes, toDescriptor
-
-
-
-
Method Detail
-
instantiate
public static java.util.List<InferenceVariable> instantiate(java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameterDeclarations)
-
unnamed
public static InferenceVariable unnamed(com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration typeParameterDeclaration)
-
isInferenceVariable
public boolean isInferenceVariable()
- Specified by:
isInferenceVariablein interfacecom.github.javaparser.resolution.types.ResolvedType
-
describe
public java.lang.String describe()
- Specified by:
describein interfacecom.github.javaparser.resolution.types.ResolvedType
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.types.ResolvedType other)
- Specified by:
isAssignableByin interfacecom.github.javaparser.resolution.types.ResolvedType
-
getTypeParameterDeclaration
public com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration getTypeParameterDeclaration()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
mention
public boolean mention(java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> typeParameters)
- Specified by:
mentionin interfacecom.github.javaparser.resolution.types.ResolvedType
-
-