public interface AnnotationDescription
Annotation
meta data of a class without this class
being required to be loaded. All values of an annotation are therefore represented in unloaded state:
Class
instances are represented as TypeDescription
s.Enum
instances are represented as
EnumerationDescription
s.Annotation
s are described as
AnnotationDescription
s.Modifier and Type | Interface and Description |
---|---|
static class |
AnnotationDescription.AbstractBase
An adapter implementation of an annotation.
|
static class |
AnnotationDescription.AnnotationInvocationHandler<T extends Annotation>
An
InvocationHandler for implementing annotations. |
static class |
AnnotationDescription.Builder
A builder for pragmatically creating
AnnotationDescription . |
static class |
AnnotationDescription.ForLoadedAnnotation<S extends Annotation>
A description of an already loaded annotation.
|
static class |
AnnotationDescription.Latent
A latent description of an annotation value that is defined explicitly.
|
static interface |
AnnotationDescription.Loadable<S extends Annotation>
An annotation description that is linked to a given loaded annotation type which allows its representation
as a fully loaded instance.
|
Modifier and Type | Field and Description |
---|---|
static AnnotationDescription.Loadable<?> |
UNDEFINED
Indicates a nonexistent annotation in a type-safe manner.
|
Modifier and Type | Method and Description |
---|---|
TypeDescription |
getAnnotationType()
Returns a description of the annotation type of this annotation.
|
Set<ElementType> |
getElementTypes()
Returns a set of all
ElementType s that can declare this annotation. |
RetentionPolicy |
getRetention()
Returns this annotation's retention policy.
|
AnnotationValue<?,?> |
getValue(MethodDescription.InDefinedShape property)
Returns the value of this annotation.
|
boolean |
isDocumented()
Checks if this annotation is documented.
|
boolean |
isInherited()
Checks if this annotation is inherited.
|
<T extends Annotation> |
prepare(Class<T> annotationType)
Links this annotation description to a given annotation type such that it can be loaded.
|
static final AnnotationDescription.Loadable<?> UNDEFINED
AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
property
- The property being accessed.TypeDescription getAnnotationType()
<T extends Annotation> AnnotationDescription.Loadable<T> prepare(Class<T> annotationType)
T
- The type of the annotation.annotationType
- The loaded annotation type of this annotation description.RetentionPolicy getRetention()
Set<ElementType> getElementTypes()
ElementType
s that can declare this annotation.boolean isInherited()
true
if this annotation is inherited.Inherited
boolean isDocumented()
true
if this annotation is documented.Documented
Copyright © 2014–2019. All rights reserved.