Class ResolvedArrayType
- java.lang.Object
-
- com.github.javaparser.resolution.types.ResolvedArrayType
-
- All Implemented Interfaces:
ResolvedType
public class ResolvedArrayType extends java.lang.Object implements ResolvedType
Array Type.
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedTypebaseType
-
Constructor Summary
Constructors Constructor Description ResolvedArrayType(ResolvedType baseType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedArrayTypeasArrayType()java.lang.Stringdescribe()booleanequals(java.lang.Object o)ResolvedTypeerasure()ResolvedTypegetComponentType()inthashCode()booleanisArray()booleanisAssignableBy(ResolvedType other)This method checks if ThisType t = new OtherType() would compile.ResolvedTypereplaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, java.util.Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)Replace all variables referring to the given TypeParameter with the given value.java.lang.StringtoDescriptor()java.lang.StringtoString()-
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, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, isConstraint, isInferenceVariable, isNull, isNumericType, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables, solveGenericTypes
-
-
-
-
Field Detail
-
baseType
private ResolvedType baseType
-
-
Constructor Detail
-
ResolvedArrayType
public ResolvedArrayType(ResolvedType baseType)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
asArrayType
public ResolvedArrayType asArrayType()
- Specified by:
asArrayTypein interfaceResolvedType
-
isArray
public boolean isArray()
- Specified by:
isArrayin interfaceResolvedType- Returns:
- true, if this type represent an array - otherwise false.
-
describe
public java.lang.String describe()
- Specified by:
describein interfaceResolvedType
-
getComponentType
public ResolvedType getComponentType()
-
isAssignableBy
public boolean isAssignableBy(ResolvedType other)
Description copied from interface:ResolvedTypeThis method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableByin interfaceResolvedType
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, java.util.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
-
erasure
public ResolvedType erasure()
- Specified by:
erasurein interfaceResolvedType
-
toDescriptor
public java.lang.String toDescriptor()
- Specified by:
toDescriptorin interfaceResolvedType
-
-