Class AnnotationDescription.Latent
java.lang.Object
net.bytebuddy.description.annotation.AnnotationDescription.AbstractBase
net.bytebuddy.description.annotation.AnnotationDescription.Latent
- All Implemented Interfaces:
AnnotationDescription
- Enclosing interface:
AnnotationDescription
A latent description of an annotation value that is defined explicitly.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A loadable annotation description of a latent annotation description.Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
AnnotationDescription.AbstractBase, AnnotationDescription.AnnotationInvocationHandler<T extends Annotation>, AnnotationDescription.Builder, AnnotationDescription.ForLoadedAnnotation<S extends Annotation>, AnnotationDescription.Latent, AnnotationDescription.RenderingDispatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDescription
The type of the annotation.private final Map
<String, ? extends AnnotationValue<?, ?>> The values of the annotation mapped by their property name.Fields inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
UNDEFINED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Latent
(TypeDescription annotationType, Map<String, ? extends AnnotationValue<?, ?>> annotationValues) Creates a new latent annotation description. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the annotation type of this annotation.AnnotationValue
<?, ?> getValue
(MethodDescription.InDefinedShape property) Returns a value of this annotation.<T extends Annotation>
AnnotationDescription.Latent.Loadable<T> Links this annotation description to a given annotation type such that it can be loaded.Methods inherited from class net.bytebuddy.description.annotation.AnnotationDescription.AbstractBase
equals, getElementTypes, getRetention, getValue, hashCode, isDocumented, isInherited, isSupportedOn, isSupportedOn, toString
-
Field Details
-
annotationType
The type of the annotation. -
annotationValues
The values of the annotation mapped by their property name.
-
-
Constructor Details
-
Latent
protected Latent(TypeDescription annotationType, Map<String, ? extends AnnotationValue<?, ?>> annotationValues) Creates a new latent annotation description.- Parameters:
annotationType
- The type of the annotation.annotationValues
- The values of the annotation mapped by their property name.
-
-
Method Details
-
getValue
Returns a value of this annotation.- Parameters:
property
- The property being accessed.- Returns:
- The value for the supplied property.
-
getAnnotationType
Returns a description of the annotation type of this annotation.- Returns:
- A description of the annotation type of this annotation.
-
prepare
public <T extends Annotation> AnnotationDescription.Latent.Loadable<T> prepare(Class<T> annotationType) Links this annotation description to a given annotation type such that it can be loaded. This does not cause the values of this annotation to be loaded.- Type Parameters:
T
- The type of the annotation.- Parameters:
annotationType
- The loaded annotation type of this annotation description.- Returns:
- A loadable version of this annotation description.
-