public abstract class ReferenceType extends Object implements Type, TypeParametrized
| Modifier and Type | Field and Description |
|---|---|
protected TypeDeclaration |
typeDeclaration |
protected List<Type> |
typeParameters |
protected TypeParametersMap |
typeParametersMap |
protected TypeSolver |
typeSolver |
| Constructor and Description |
|---|
ReferenceType(TypeDeclaration typeDeclaration,
List<Type> typeParameters,
TypeSolver typeSolver) |
ReferenceType(TypeDeclaration typeDeclaration,
TypeSolver typeSolver) |
| Modifier and Type | Method and Description |
|---|---|
ReferenceType |
asReferenceType() |
abstract TypeParameterDeclaration |
asTypeParameter() |
protected boolean |
compareConsideringTypeParameters(ReferenceType other) |
protected abstract ReferenceType |
create(TypeDeclaration typeDeclaration,
List<Type> typeParametersCorrected,
TypeSolver typeSolver) |
protected abstract ReferenceType |
create(TypeDeclaration typeDeclaration,
TypeSolver typeSolver) |
String |
describe() |
boolean |
equals(Object o) |
List<ReferenceType> |
getAllAncestors()
Return all ancestors, that means all superclasses and interfaces.
|
List<ReferenceType> |
getAllInterfacesAncestors() |
abstract Set<MethodUsage> |
getDeclaredMethods() |
Optional<Type> |
getFieldType(String name)
The type of the field could be different from the one in the corresponding FieldDeclaration because
type variables would be solved.
|
Optional<Type> |
getGenericParameterByName(String name)
Deprecated.
|
String |
getQualifiedName() |
TypeDeclaration |
getTypeDeclaration() |
List<javaslang.Tuple2<TypeParameterDeclaration,Type>> |
getTypeParametersMap()
Deprecated.
|
int |
hashCode() |
boolean |
hasName() |
boolean |
isArray()
Does this type represent an array?
|
abstract boolean |
isAssignableBy(Type other)
This method checks if ThisType t = new OtherType() would compile.
|
protected boolean |
isCorrespondingBoxingType(String typeName) |
boolean |
isPrimitive()
Is this a primitive type?
|
boolean |
isRawType() |
boolean |
isReferenceType()
Can this be seen as a ReferenceTypeUsage?
In other words: is this a reference to a class, an interface or an enum?
|
boolean |
isTypeVariable() |
Type |
replaceParam(int i,
Type replaced)
Deprecated.
|
Type |
replaceParam(String name,
Type replaced) |
Type |
replaceTypeParams(Type type)
Deprecated.
|
String |
toString() |
TypeParametersMap |
typeParametersMap() |
List<Type> |
typeParametersValues()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitarrayLevel, asArrayType, asPrimitive, asWildcard, isNull, isReference, isVoid, isWildcard, replaceParamprotected TypeDeclaration typeDeclaration
protected TypeSolver typeSolver
protected TypeParametersMap typeParametersMap
public ReferenceType(TypeDeclaration typeDeclaration, TypeSolver typeSolver)
public ReferenceType(TypeDeclaration typeDeclaration, List<Type> typeParameters, TypeSolver typeSolver)
public ReferenceType asReferenceType()
asReferenceType in interface Typepublic final TypeDeclaration getTypeDeclaration()
public final boolean isArray()
Typepublic final boolean isPrimitive()
TypeisPrimitive in interface Typepublic final boolean isReferenceType()
TypeisReferenceType in interface Typeprotected abstract ReferenceType create(TypeDeclaration typeDeclaration, TypeSolver typeSolver)
public Optional<Type> getFieldType(String name)
@Deprecated public Optional<Type> getGenericParameterByName(String name)
@Deprecated public Type replaceParam(int i, Type replaced)
protected abstract ReferenceType create(TypeDeclaration typeDeclaration, List<Type> typeParametersCorrected, TypeSolver typeSolver)
public Type replaceParam(String name, Type replaced)
replaceParam in interface Typepublic List<ReferenceType> getAllAncestors()
public List<ReferenceType> getAllInterfacesAncestors()
@Deprecated public Type replaceTypeParams(Type type)
@Deprecated public List<Type> typeParametersValues()
public abstract TypeParameterDeclaration asTypeParameter()
asTypeParameter in interface Typepublic boolean isTypeVariable()
isTypeVariable in interface Typepublic abstract boolean isAssignableBy(Type other)
isAssignableBy in interface Typepublic boolean hasName()
protected boolean compareConsideringTypeParameters(ReferenceType other)
protected boolean isCorrespondingBoxingType(String typeName)
public String getQualifiedName()
public abstract Set<MethodUsage> getDeclaredMethods()
public boolean isRawType()
@Deprecated public List<javaslang.Tuple2<TypeParameterDeclaration,Type>> getTypeParametersMap()
public TypeParametersMap typeParametersMap()
typeParametersMap in interface TypeParametrizedCopyright © 2016. All rights reserved.