AnnotatedType represents the potentially annotated use of a type in
the program currently running in this VM. The use may be of any type in the
Java programming language, including an array type, a parameterized type, a
type variable, or a wildcard type.
Note that any annotations returned by methods on this interface are
type annotations (JLS 9.7.4) as the entity being
potentially annotated is a type.
| Modifier and Type | Method and Description |
|---|---|
| public default AnnotatedType | Returns: anAnnotatedType object representing the potentially
annotated type that this type is a member of, or nullReturns the potentially annotated type that this type is a member of, if this type represents a nested type. |
| public <T extends Annotation> T | getAnnotation(Class<T> annotationClass)
Redeclares java. Returns this element's annotation for the specified type if such an annotation is present, else null. |
| public Annotation[] | getAnnotations()
Redeclares java. Returns annotations that are present on this element. |
| public Annotation[] | getDeclaredAnnotations()
Redeclares java. Returns annotations that are directly present on this element. |
| public Type | Returns: the type this annotated type representsReturns the underlying type that this annotated type represents. |
| getAnnotatedOwnerType | back to summary |
|---|---|
| public default AnnotatedType getAnnotatedOwnerType() Returns the potentially annotated type that this type is a member of, if
this type represents a nested type. For example, if this type is
Returns Returns Implementation Specification This default implementation returns
| |
| getAnnotation | back to summary |
|---|---|
| public <T extends Annotation> T getAnnotation(Class<T> annotationClass) Redeclares java. Doc from java. Returns this element's annotation for the specified type if such an annotation is present, else null. Note that any annotation returned by this method is a type annotation.
| |
| getAnnotations | back to summary |
|---|---|
| public Annotation[] getAnnotations() Redeclares java. Doc from java. Returns annotations that are present on this element. If there are no annotations present on this element, the return value is an array of length 0. The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers. Note that any annotations returned by this method are type annotations.
| |
| getDeclaredAnnotations | back to summary |
|---|---|
| public Annotation[] getDeclaredAnnotations() Redeclares java. Doc from java. Returns annotations that are directly present on this element. This method ignores inherited annotations. If there are no annotations directly present on this element, the return value is an array of length 0. The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers. Note that any annotations returned by this method are type annotations.
| |
| getType | back to summary |
|---|---|
| public Type getType() Returns the underlying type that this annotated type represents.
| |