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 interface |
AnnotationDescription.AnnotationValue<T,S>
A description of an annotation's value.
|
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 | Method and Description |
---|---|
TypeDescription |
getAnnotationType()
Returns a description of the annotation type of this annotation.
|
RetentionPolicy |
getRetention()
Returns this annotation's retention policy.
|
Object |
getValue(MethodDescription.InDefinedShape methodDescription)
Returns the value of the given method for this annotation value.
|
<T> T |
getValue(MethodDescription.InDefinedShape methodDescription,
Class<T> type)
Returns the value of the given method for this annotation value and performs a casting to the given value.
|
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.
|
Object getValue(MethodDescription.InDefinedShape methodDescription)
AnnotationDescription
.methodDescription
- The method for the value to be requested.<T> T getValue(MethodDescription.InDefinedShape methodDescription, Class<T> type)
AnnotationDescription
.T
- The given type of the return value.methodDescription
- The method for the value to be requested.type
- The type to which the returned value should be casted.type
.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()
boolean isInherited()
true
if this annotation is inherited.Inherited
boolean isDocumented()
true
if this annotation is documented.Documented
Copyright © 2014–2015. All rights reserved.