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.AbstractAnnotationDescription
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.
|
Object |
getValue(MethodDescription methodDescription)
Returns the value of the given method for this annotation value.
|
<T> T |
getValue(MethodDescription methodDescription,
Class<T> type)
Returns the value of the given method for this annotation value and performs a casting to the given value.
|
<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 methodDescription)
AnnotationDescription
.methodDescription
- The method for the value to be requested.<T> T getValue(MethodDescription 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.Copyright © 2014–2015. All rights reserved.