public static class AnnotatedTypeMirror.AnnotatedExecutableType extends AnnotatedTypeMirror
AnnotatedTypeMirror.AnnotatedArrayType, AnnotatedTypeMirror.AnnotatedDeclaredType, AnnotatedTypeMirror.AnnotatedExecutableType, AnnotatedTypeMirror.AnnotatedIntersectionType, AnnotatedTypeMirror.AnnotatedNoType, AnnotatedTypeMirror.AnnotatedNullType, AnnotatedTypeMirror.AnnotatedPrimitiveType, AnnotatedTypeMirror.AnnotatedTypeVariable, AnnotatedTypeMirror.AnnotatedUnionType, AnnotatedTypeMirror.AnnotatedWildcardType| Modifier and Type | Field and Description |
|---|---|
protected List<AnnotatedTypeMirror> |
paramTypes |
protected AnnotatedTypeMirror.AnnotatedDeclaredType |
receiverType |
protected AnnotatedTypeMirror |
returnType |
protected List<AnnotatedTypeMirror> |
throwsTypes |
protected List<AnnotatedTypeMirror.AnnotatedTypeVariable> |
typeVarTypes |
annotations, atypeFactory, EQUALITY_COMPARER, HASHCODE_VISITOR, underlyingType| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(AnnotatedTypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
void |
addAnnotation(AnnotationMirror a)
It never makes sense to add annotations to an executable type - instead, they should be added
to the right component.
|
AnnotatedTypeMirror.AnnotatedExecutableType |
deepCopy()
Returns a deep copy of this type with annotations.
|
AnnotatedTypeMirror.AnnotatedExecutableType |
deepCopy(boolean copyAnnotations)
Returns a deep copy of this type.
|
@NonNull ExecutableElement |
getElement() |
AnnotatedTypeMirror.AnnotatedExecutableType |
getErased()
Returns the erasure type of the this type, according to JLS specifications.
|
List<AnnotatedTypeMirror> |
getParameterTypes()
Returns the parameter types of this executable type, excluding the receiver.
|
@Nullable AnnotatedTypeMirror.AnnotatedDeclaredType |
getReceiverType()
Returns the receiver type of this executable type; null for static methods and constructors
of top-level classes.
|
AnnotatedTypeMirror |
getReturnType()
The return type of a method or constructor.
|
List<AnnotatedTypeMirror> |
getThrownTypes()
Returns the thrown types of this executable type.
|
List<AnnotatedTypeMirror.AnnotatedTypeVariable> |
getTypeVariables()
Returns the type variables of this executable type, if any.
|
ExecutableType |
getUnderlyingType()
Returns the underlying unannotated Java type, which this wraps.
|
boolean |
isVarArgs()
Returns true if this type represents a varargs method.
|
void |
setElement(@NonNull ExecutableElement elem) |
AnnotatedTypeMirror.AnnotatedExecutableType |
shallowCopy()
Returns a shallow copy of this type with annotations.
|
AnnotatedTypeMirror.AnnotatedExecutableType |
shallowCopy(boolean copyAnnotations)
Returns a shallow copy of this type.
|
addAnnotation, addAnnotations, addMissingAnnotations, asUse, clearPrimaryAnnotations, containsUninferredTypeArguments, createType, createTypeOfObject, directSupertypes, equals, getAnnotation, getAnnotation, getAnnotation, getAnnotationInHierarchy, getAnnotations, getAnnotationsField, getEffectiveAnnotation, getEffectiveAnnotationInHierarchy, getEffectiveAnnotations, getExplicitAnnotations, getKind, getPrimitiveKind, getUnderlyingTypeHashCode, hasAnnotation, hasAnnotation, hasAnnotationRelaxed, hasEffectiveAnnotation, hasEffectiveAnnotation, hasEffectiveAnnotationRelaxed, hasExplicitAnnotation, hasExplicitAnnotation, hasExplicitAnnotationRelaxed, hashCode, isAnnotatedInHierarchy, isDeclaration, removeAnnotation, removeAnnotationByClass, removeAnnotationInHierarchy, removeAnnotations, removeNonTopAnnotationInHierarchy, replaceAnnotation, replaceAnnotations, toString, toStringprotected final List<AnnotatedTypeMirror> paramTypes
protected AnnotatedTypeMirror.AnnotatedDeclaredType receiverType
protected AnnotatedTypeMirror returnType
protected final List<AnnotatedTypeMirror> throwsTypes
protected final List<AnnotatedTypeMirror.AnnotatedTypeVariable> typeVarTypes
public boolean isVarArgs()
public <R,P> R accept(AnnotatedTypeVisitor<R,P> v, P p)
AnnotatedTypeMirroraccept in class 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 ExecutableType getUnderlyingType()
AnnotatedTypeMirrorgetUnderlyingType in class AnnotatedTypeMirrorpublic void addAnnotation(AnnotationMirror a)
addAnnotation in class AnnotatedTypeMirrora - the annotation to addpublic List<AnnotatedTypeMirror> getParameterTypes()
public AnnotatedTypeMirror getReturnType()
public @Nullable AnnotatedTypeMirror.AnnotatedDeclaredType getReceiverType()
public List<AnnotatedTypeMirror> getThrownTypes()
public List<AnnotatedTypeMirror.AnnotatedTypeVariable> getTypeVariables()
public AnnotatedTypeMirror.AnnotatedExecutableType deepCopy(boolean copyAnnotations)
AnnotatedTypeMirrorNote: deepCopy provides two important properties in the returned copy:
deepCopy in class AnnotatedTypeMirrorpublic AnnotatedTypeMirror.AnnotatedExecutableType deepCopy()
AnnotatedTypeMirrorEach subclass implements this method with the subclass return type. The method body must always be a call to deepCopy(true).
deepCopy in class AnnotatedTypeMirrorAnnotatedTypeMirror.deepCopy(boolean)public AnnotatedTypeMirror.AnnotatedExecutableType shallowCopy(boolean copyAnnotations)
AnnotatedTypeMirrorshallowCopy in class AnnotatedTypeMirrorcopyAnnotations - whether copy should have annotations, i.e. whether field annotations should be copied.public AnnotatedTypeMirror.AnnotatedExecutableType shallowCopy()
AnnotatedTypeMirrorEach subclass implements this method with the subclass return type. The method body must always be a call to shallowCopy(true).
shallowCopy in class AnnotatedTypeMirrorAnnotatedTypeMirror.shallowCopy(boolean)public @NonNull ExecutableElement getElement()
public void setElement(@NonNull ExecutableElement elem)
public AnnotatedTypeMirror.AnnotatedExecutableType getErased()
AnnotatedTypeMirrorgetErased in class AnnotatedTypeMirror