Class LazyType
java.lang.Object
com.github.javaparser.resolution.model.typesystem.LazyType
- All Implemented Interfaces:
ResolvedType
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdescribe()private ResolvedTypegetType()booleanisArray()booleanisAssignableBy(ResolvedType other) This method checks if ThisType t = new OtherType() would compile.booleanisNull()Is this the null type?booleanIs this a primitive type?booleanIs this a non primitive value?booleanCan this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?booleanbooleanisVoid()booleanreplaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced) This is like (ResolvedType.replaceTypeVariables(ResolvedTypeParameterDeclaration, ResolvedType, Map)but ignores the inferred values.replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration, ResolvedType> inferredTypes) Replace all variables referring to the given TypeParameter with the given value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.javaparser.resolution.types.ResolvedType
asConstraintType, asUnionType, erasure, isConstraint, isInferenceVariable, isNumericType, isUnionType, mention, solveGenericTypes, toDescriptor
-
Field Details
-
concrete
-
provider
-
-
Constructor Details
-
LazyType
-
-
Method Details
-
getType
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceResolvedType- Returns:
- true, if this type represent an array - otherwise false.
-
arrayLevel
public int arrayLevel()- Specified by:
arrayLevelin interfaceResolvedType- Returns:
- The level of nesting that this type is present at. For example, int[][] would have an array level of 2, and int would have an array level of 0 (not an array).
-
isPrimitive
public boolean isPrimitive()Description copied from interface:ResolvedTypeIs this a primitive type?- Specified by:
isPrimitivein interfaceResolvedType
-
isNull
public boolean isNull()Description copied from interface:ResolvedTypeIs this the null type?- Specified by:
isNullin interfaceResolvedType
-
isReference
public boolean isReference()Description copied from interface:ResolvedTypeIs this a non primitive value?- Specified by:
isReferencein interfaceResolvedType
-
isReferenceType
public boolean isReferenceType()Description copied from interface:ResolvedTypeCan this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?- Specified by:
isReferenceTypein interfaceResolvedType
-
isVoid
public boolean isVoid()- Specified by:
isVoidin interfaceResolvedType
-
isTypeVariable
public boolean isTypeVariable()- Specified by:
isTypeVariablein interfaceResolvedType
-
isWildcard
public boolean isWildcard()- Specified by:
isWildcardin interfaceResolvedType
-
asArrayType
- Specified by:
asArrayTypein interfaceResolvedType
-
asReferenceType
- Specified by:
asReferenceTypein interfaceResolvedType
-
asTypeParameter
- Specified by:
asTypeParameterin interfaceResolvedType
-
asTypeVariable
- Specified by:
asTypeVariablein interfaceResolvedType
-
asPrimitive
- Specified by:
asPrimitivein interfaceResolvedType
-
asWildcard
- Specified by:
asWildcardin interfaceResolvedType
-
describe
- Specified by:
describein interfaceResolvedType
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration, ResolvedType> inferredTypes) Description copied from interface:ResolvedTypeReplace all variables referring to the given TypeParameter with the given value. By replacing these values I could also infer some type equivalence. Those would be collected in the given map.- Specified by:
replaceTypeVariablesin interfaceResolvedType
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tp, ResolvedType replaced) Description copied from interface:ResolvedTypeThis is like (ResolvedType.replaceTypeVariables(ResolvedTypeParameterDeclaration, ResolvedType, Map)but ignores the inferred values.- Specified by:
replaceTypeVariablesin interfaceResolvedType
-
isAssignableBy
Description copied from interface:ResolvedTypeThis method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableByin interfaceResolvedType
-