public static class AnnotatedTypeMirror.AnnotatedDeclaredType extends @Mutable AnnotatedTypeMirror implements AnnotatedTypeMirror.AnnotatedReferenceType
AnnotatedTypeMirror.AnnotatedArrayType, AnnotatedTypeMirror.AnnotatedDeclaredType, AnnotatedTypeMirror.AnnotatedExecutableType, AnnotatedTypeMirror.AnnotatedNoType, AnnotatedTypeMirror.AnnotatedNullType, AnnotatedTypeMirror.AnnotatedPrimitiveType, AnnotatedTypeMirror.AnnotatedReferenceType, AnnotatedTypeMirror.AnnotatedTypeVariable, AnnotatedTypeMirror.AnnotatedWildcardType| Modifier and Type | Field and Description |
|---|---|
protected DeclaredType |
actualType |
protected boolean |
isGeneric |
protected List<AnnotatedTypeMirror.AnnotatedDeclaredType> |
supertypes |
protected List<@Mutable AnnotatedTypeMirror> |
typeArgs
Parametrized Type Arguments
|
annotationFactory, annotations, element, enclosingType, env, typeFactory, uid| Modifier and Type | Method and Description |
|---|---|
<R extends @NonNull Object,P extends @NonNull Object> |
accept(AnnotatedTypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
List<AnnotatedTypeMirror.AnnotatedDeclaredType> |
directSuperTypes() |
List<AnnotatedTypeMirror.AnnotatedDeclaredType> |
directSuperTypesField() |
AnnotatedTypeMirror.AnnotatedDeclaredType |
getCopy(boolean copyAnnotations)
Returns a shallow copy of this type.
|
AnnotatedTypeMirror.AnnotatedDeclaredType |
getErased()
Returns the erasure type of the this type, according to JLS
specifications.
|
List<@Mutable AnnotatedTypeMirror> |
getTypeArguments() |
DeclaredType |
getUnderlyingType()
Returns the underlying unannotated Java type, which this wraps
|
boolean |
isGeneric()
Returns true if the type is generic, even if the type is erased
or used as a RAW type.
|
boolean |
isParameterized()
Returns true if the type is a generic type and the type declaration
is parameterized.
|
void |
setTypeArguments(List<? extends @Mutable AnnotatedTypeMirror> ts)
Sets the type arguments on this type
|
@Mutable AnnotatedTypeMirror |
substitute(Map<? extends @Mutable AnnotatedTypeMirror,? extends @Mutable AnnotatedTypeMirror> mapping)
Return a copy of this, with the given substitutions performed.
|
@ReadOnly String |
toString(boolean printInvisible)
A version of toString() that optionally outputs all type qualifiers,
including @InvisibleQualifier's.
|
addAnnotation, addAnnotation, addAnnotations, clearAnnotations, copyFields, createType, createTypeOfObject, directSuperTypes, equals, formatAnnotationString, getAnnotation, getAnnotation, getAnnotation, getAnnotationInHierarchy, getAnnotations, getEffectiveAnnotations, getElement, getEnclosingType, getExplicitAnnotations, getKind, hasAnnotation, hasAnnotation, hasAnnotationRelaxed, hasEffectiveAnnotation, hasEffectiveAnnotationRelaxed, hasExplicitAnnotation, hasExplicitAnnotation, hasExplicitAnnotationRelaxed, hashCode, isAnnotated, isAnnotatedInHierarchy, isUnqualified, removeAnnotation, removeAnnotation, removeAnnotationInHierarchy, removeAnnotations, removeUnqualified, replaceAnnotation, replaceAnnotations, toString, toStringDebugprotected List<@Mutable AnnotatedTypeMirror> typeArgs
protected boolean isGeneric
protected final DeclaredType actualType
protected List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes
public @ReadOnly String toString(boolean printInvisible)
AnnotatedTypeMirrortoString in class @Mutable AnnotatedTypeMirrorprintInvisible - Whether to always output invisible qualifiers.public <R extends @NonNull Object,P extends @NonNull Object> R accept(AnnotatedTypeVisitor<R,P> v, P p)
AnnotatedTypeMirroraccept in class @Mutable AnnotatedTypeMirrorR - 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 visitorpublic void setTypeArguments(List<? extends @Mutable AnnotatedTypeMirror> ts)
ts - the type argumentspublic List<@Mutable AnnotatedTypeMirror> getTypeArguments()
public boolean isGeneric()
public boolean isParameterized()
public DeclaredType getUnderlyingType()
AnnotatedTypeMirrorgetUnderlyingType in class @Mutable AnnotatedTypeMirrorpublic List<AnnotatedTypeMirror.AnnotatedDeclaredType> directSuperTypes()
directSuperTypes in class @Mutable AnnotatedTypeMirrorpublic List<AnnotatedTypeMirror.AnnotatedDeclaredType> directSuperTypesField()
public AnnotatedTypeMirror.AnnotatedDeclaredType getCopy(boolean copyAnnotations)
AnnotatedTypeMirrorgetCopy in class @Mutable AnnotatedTypeMirrorcopyAnnotations - whether copy should have annotationspublic @Mutable AnnotatedTypeMirror substitute(Map<? extends @Mutable AnnotatedTypeMirror,? extends @Mutable AnnotatedTypeMirror> mapping)
AnnotatedTypeMirrorsubstitute in class @Mutable AnnotatedTypeMirrorpublic AnnotatedTypeMirror.AnnotatedDeclaredType getErased()
AnnotatedTypeMirrorgetErased in class @Mutable AnnotatedTypeMirror