Class ResolvedArrayType
- java.lang.Object
-
- com.github.javaparser.resolution.types.ResolvedArrayType
-
- All Implemented Interfaces:
ResolvedType
public class ResolvedArrayType extends Object implements ResolvedType
Array Type.- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description ResolvedArrayType(ResolvedType baseType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedArrayType
asArrayType()
String
describe()
boolean
equals(Object o)
ResolvedType
getComponentType()
int
hashCode()
boolean
isArray()
Does this type represent an array?boolean
isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.ResolvedType
replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)
Replace all variables referring to the given TypeParameter with the given value.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, asConstraintType, asPrimitive, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, isConstraint, isNull, isPrimitive, isReference, isReferenceType, isTypeVariable, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables
-
-
-
-
Constructor Detail
-
ResolvedArrayType
public ResolvedArrayType(ResolvedType baseType)
-
-
Method Detail
-
asArrayType
public ResolvedArrayType asArrayType()
- Specified by:
asArrayType
in interfaceResolvedType
-
isArray
public boolean isArray()
Description copied from interface:ResolvedType
Does this type represent an array?- Specified by:
isArray
in interfaceResolvedType
-
describe
public String describe()
- Specified by:
describe
in interfaceResolvedType
-
getComponentType
public ResolvedType getComponentType()
-
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
-
replaceTypeVariables
public ResolvedType replaceTypeVariables(ResolvedTypeParameterDeclaration tpToReplace, ResolvedType replaced, Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes)
Description copied from interface:ResolvedType
Replace 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:
replaceTypeVariables
in interfaceResolvedType
-
-