S
- The type of the annotation.public static class AnnotationDescription.ForLoadedAnnotation<S extends Annotation> extends AnnotationDescription.AbstractBase implements AnnotationDescription.Loadable<S>
AnnotationDescription.AbstractBase, AnnotationDescription.AnnotationInvocationHandler<T extends Annotation>, AnnotationDescription.Builder, AnnotationDescription.ForLoadedAnnotation<S extends Annotation>, AnnotationDescription.Latent, AnnotationDescription.Loadable<S extends Annotation>, AnnotationDescription.RenderingDispatcher
UNDEFINED
Modifier | Constructor and Description |
---|---|
protected |
ForLoadedAnnotation(S annotation)
Creates a new annotation description for a loaded annotation.
|
Modifier and Type | Method and Description |
---|---|
static AnnotationValue<?,?> |
asValue(Object value,
Class<?> type)
Transforms an annotation property to an annotation value.
|
TypeDescription |
getAnnotationType()
Returns a description of the annotation type of this annotation.
|
AnnotationValue<?,?> |
getValue(MethodDescription.InDefinedShape property)
Returns the value of this annotation.
|
S |
load()
Loads this annotation description.
|
static <U extends Annotation> |
of(U annotation)
Creates a description of the given annotation.
|
<T extends Annotation> |
prepare(Class<T> annotationType)
Links this annotation description to a given annotation type such that it can be loaded.
|
equals, getElementTypes, getRetention, hashCode, isDocumented, isInherited, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getElementTypes, getRetention, isDocumented, isInherited
protected ForLoadedAnnotation(S annotation)
annotation
- The annotation to represent.public static <U extends Annotation> AnnotationDescription.Loadable<U> of(U annotation)
U
- The type of the annotation.annotation
- The annotation to be described.public S load()
load
in interface AnnotationDescription.Loadable<S extends Annotation>
public static AnnotationValue<?,?> asValue(Object value, Class<?> type)
type
- The annotation's type.value
- The annotations value.public AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
getValue
in interface AnnotationDescription
property
- The property being accessed.public <T extends Annotation> AnnotationDescription.Loadable<T> prepare(Class<T> annotationType)
prepare
in interface AnnotationDescription
T
- The type of the annotation.annotationType
- The loaded annotation type of this annotation description.public TypeDescription getAnnotationType()
getAnnotationType
in interface AnnotationDescription
Copyright © 2014–2020. All rights reserved.