Class InferenceVariableType
- java.lang.Object
-
- com.github.javaparser.resolution.logic.InferenceVariableType
-
- All Implemented Interfaces:
ResolvedType
public class InferenceVariableType extends java.lang.Object implements ResolvedType
An element using during type inference.
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedTypeParameterDeclaration
correspondingTp
private java.util.Set<ResolvedType>
equivalentTypes
private int
id
private java.util.Set<ResolvedType>
superTypes
private TypeSolver
typeSolver
-
Constructor Summary
Constructors Constructor Description InferenceVariableType(int id, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Set<ResolvedType>
concreteEquivalentTypesAlsoIndirectly(java.util.Set<InferenceVariableType> considered, InferenceVariableType inferenceVariableType)
java.lang.String
describe()
boolean
equals(java.lang.Object o)
ResolvedType
equivalentType()
int
hashCode()
private boolean
hasInferenceVariables(ResolvedType type)
boolean
isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.void
registerEquivalentType(ResolvedType type)
void
setCorrespondingTp(ResolvedTypeParameterDeclaration correspondingTp)
java.lang.String
toString()
-
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, isInferenceVariable, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables, replaceTypeVariables, solveGenericTypes, toDescriptor
-
-
-
-
Field Detail
-
id
private int id
-
correspondingTp
private ResolvedTypeParameterDeclaration correspondingTp
-
equivalentTypes
private java.util.Set<ResolvedType> equivalentTypes
-
typeSolver
private TypeSolver typeSolver
-
superTypes
private java.util.Set<ResolvedType> superTypes
-
-
Constructor Detail
-
InferenceVariableType
public InferenceVariableType(int id, TypeSolver typeSolver)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setCorrespondingTp
public void setCorrespondingTp(ResolvedTypeParameterDeclaration correspondingTp)
-
registerEquivalentType
public void registerEquivalentType(ResolvedType type)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
describe
public java.lang.String describe()
- Specified by:
describe
in interfaceResolvedType
-
isAssignableBy
public boolean isAssignableBy(ResolvedType other)
Description copied from interface:ResolvedType
This method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableBy
in interfaceResolvedType
-
concreteEquivalentTypesAlsoIndirectly
private java.util.Set<ResolvedType> concreteEquivalentTypesAlsoIndirectly(java.util.Set<InferenceVariableType> considered, InferenceVariableType inferenceVariableType)
-
equivalentType
public ResolvedType equivalentType()
-
hasInferenceVariables
private boolean hasInferenceVariables(ResolvedType type)
-
-