public static class Type.ClassType extends Type implements DeclaredType
Type.AnnotatedType, Type.ArrayType, Type.CapturedType, Type.CapturedUndetVar, Type.ClassType, Type.DelegatedType, Type.ErasedClassType, Type.ErrorType, Type.ForAll, Type.IntersectionClassType, Type.JCNoType, Type.JCPrimitiveType, Type.JCVoidType, Type.Mapping, Type.MethodType, Type.PackageType, Type.TypeVar, Type.UndetVar, Type.UnionClassType, Type.UnknownType, Type.Visitor<R,S>, Type.WildcardType
Modifier and Type | Field and Description |
---|---|
List<Type> |
all_interfaces_field
All the interfaces of this class, including missing ones.
|
List<Type> |
allparams_field
A cache variable for the type parameters of this type,
appended to all parameters of its enclosing class.
|
List<Type> |
interfaces_field
The interfaces of this class (to be set once class is loaded).
|
Type |
supertype_field
The supertype of this class (to be set once class is loaded).
|
List<Type> |
typarams_field
The type parameters of this type (to be set once class is loaded).
|
Constructor and Description |
---|
ClassType(Type outer,
List<Type> typarams,
Symbol.TypeSymbol tsym) |
Modifier and Type | Method and Description |
---|---|
<R,S> R |
accept(Type.Visitor<R,S> v,
S s) |
<R,P> R |
accept(TypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
List<Type> |
allparams()
Return all parameters of this type and all its outer types in order
outer (first) to inner (last).
|
void |
complete()
Complete loading all classes in this type.
|
Type |
constType(Object constValue)
Define a constant type, of the same kind as this type
and with given constant value
|
boolean |
contains(Type elem)
Does this type contain occurrences of type t?
|
Type |
getEnclosingType()
Returns the type of the innermost enclosing instance or a
NoType of kind NONE if there is no enclosing
instance. |
TypeKind |
getKind()
Returns the
kind of this type. |
TypeTag |
getTag()
Returns the current type tag.
|
List<Type> |
getTypeArguments()
Access methods.
|
boolean |
hasErasedSupertypes() |
boolean |
isErroneous()
Does this type contain "error" elements?
|
boolean |
isNullOrReference() |
boolean |
isParameterized()
Is this type parameterized?
A class type is parameterized if it has some parameters.
|
boolean |
isRaw()
A class type is raw if it misses some
of its type parameter sections.
|
boolean |
isReference() |
Type |
map(Type.Mapping f)
map a type function over all immediate descendants of this type
|
void |
setEnclosingType(Type outer) |
String |
toString()
The Java source which this type represents.
|
annotatedType, argtypes, asElement, asMethodType, baseType, baseTypes, constValue, contains, containsAny, containsAny, equals, filter, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getLowerBound, getModelType, getModelTypes, getOriginalType, getParameterTypes, getReceiverType, getReturnType, getThrownTypes, getUpperBound, hashCode, hasTag, isAnnotated, isCompound, isErroneous, isExtendsBound, isFalse, isFinal, isInterface, isNumeric, isPartial, isPrimitive, isPrimitiveOrVoid, isSuperBound, isTrue, isUnbound, map, stringValue, toString, unannotatedType, withTypeVar
getAttribute, getInheritedAnnotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asElement
equals, hashCode
getAnnotation, getAnnotationMirrors, getAnnotationsByType
public List<Type> typarams_field
public List<Type> allparams_field
allparams()
public Type supertype_field
public List<Type> interfaces_field
public ClassType(Type outer, List<Type> typarams, Symbol.TypeSymbol tsym)
public <R,S> R accept(Type.Visitor<R,S> v, S s)
public Type constType(Object constValue)
Type
public String toString()
toString
in interface TypeMirror
toString
in class Type
public List<Type> getTypeArguments()
Type
getTypeArguments
in interface DeclaredType
getTypeArguments
in class Type
public boolean hasErasedSupertypes()
public Type getEnclosingType()
DeclaredType
NoType
of kind NONE
if there is no enclosing
instance. Only types corresponding to inner classes have an
enclosing instance.getEnclosingType
in interface DeclaredType
getEnclosingType
in class Type
public void setEnclosingType(Type outer)
public List<Type> allparams()
Type
public boolean isErroneous()
Type
isErroneous
in class Type
public boolean isParameterized()
Type
isParameterized
in class Type
public boolean isReference()
isReference
in class Type
public boolean isNullOrReference()
isNullOrReference
in class Type
public boolean isRaw()
allparams.isEmpty() && tsym.type.allparams.nonEmpty();
public Type map(Type.Mapping f)
Type
public boolean contains(Type elem)
Type
public void complete()
Type
public TypeKind getKind()
TypeMirror
kind
of this type.getKind
in interface TypeMirror
getKind
in class Type
public <R,P> R accept(TypeVisitor<R,P> v, P p)
TypeMirror
accept
in interface TypeMirror
accept
in class Type
R
- the return type of the visitor's methodsP
- the type of the additional parameter to the visitor's methodsv
- the visitor operating on this typep
- additional parameter to the visitorCopyright © 2015. All rights reserved.