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
public static class AnnotationDescription.Latent extends AnnotationDescription.AbstractBase
A latent description of an annotation value that is defined explicitly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AnnotationDescription.Latent.Loadable<S extends java.lang.annotation.Annotation>
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 java.lang.annotation.Annotation>, AnnotationDescription.Builder, AnnotationDescription.ForLoadedAnnotation<S extends java.lang.annotation.Annotation>, AnnotationDescription.Latent, AnnotationDescription.RenderingDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescription
annotationType
The type of the annotation.private java.util.Map<java.lang.String,? extends AnnotationValue<?,?>>
annotationValues
The values of the annotation mapped by their property name.-
Fields inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Latent(TypeDescription annotationType, java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> annotationValues)
Creates a new latent annotation description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeDescription
getAnnotationType()
Returns a description of the annotation type of this annotation.AnnotationValue<?,?>
getValue(MethodDescription.InDefinedShape property)
Returns the value of this annotation.<T extends java.lang.annotation.Annotation>
AnnotationDescription.Latent.Loadable<T>prepare(java.lang.Class<T> annotationType)
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, hashCode, isDocumented, isInherited, toString
-
-
-
-
Field Detail
-
annotationType
private final TypeDescription annotationType
The type of the annotation.
-
annotationValues
private final java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> annotationValues
The values of the annotation mapped by their property name.
-
-
Constructor Detail
-
Latent
protected Latent(TypeDescription annotationType, java.util.Map<java.lang.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 Detail
-
getValue
public AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
Returns the value of this annotation.- Parameters:
property
- The property being accessed.- Returns:
- The value for the supplied property.
-
getAnnotationType
public TypeDescription 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 java.lang.annotation.Annotation> AnnotationDescription.Latent.Loadable<T> prepare(java.lang.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.
-
-