Class AnnotationDescription.Latent.Loadable<S extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationDescription.AbstractBase
-
- net.bytebuddy.description.annotation.AnnotationDescription.Latent.Loadable<S>
-
- Type Parameters:
S
- The annotation type.
- All Implemented Interfaces:
AnnotationDescription
,AnnotationDescription.Loadable<S>
- Enclosing class:
- AnnotationDescription.Latent
protected class AnnotationDescription.Latent.Loadable<S extends java.lang.annotation.Annotation> extends AnnotationDescription.AbstractBase implements AnnotationDescription.Loadable<S>
A loadable annotation description of a latent annotation description.
-
-
Nested Class Summary
-
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.Loadable<S extends java.lang.annotation.Annotation>, AnnotationDescription.RenderingDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<S>
annotationType
The annotation type.-
Fields inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
UNDEFINED
-
-
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.S
load()
Loads this annotation description.<T extends java.lang.annotation.Annotation>
AnnotationDescription.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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
getElementTypes, getRetention, isDocumented, isInherited
-
-
-
-
Field Detail
-
annotationType
private final java.lang.Class<S extends java.lang.annotation.Annotation> annotationType
The annotation type.
-
-
Constructor Detail
-
Loadable
protected Loadable(java.lang.Class<S> annotationType)
Creates a loadable version of a latent annotation description.- Parameters:
annotationType
- The annotation type.
-
-
Method Detail
-
load
public S load()
Loads this annotation description. This causes all classes referenced by the annotation value to be loaded. Without specifying a class loader, the annotation's class loader which was used to prepare this instance is used.- Specified by:
load
in interfaceAnnotationDescription.Loadable<S extends java.lang.annotation.Annotation>
- Returns:
- A loaded version of this annotation description.
-
getValue
public AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
Returns the value of this annotation.- Specified by:
getValue
in interfaceAnnotationDescription
- 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.- Specified by:
getAnnotationType
in interfaceAnnotationDescription
- Returns:
- A description of the annotation type of this annotation.
-
prepare
public <T extends java.lang.annotation.Annotation> AnnotationDescription.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.- Specified by:
prepare
in interfaceAnnotationDescription
- 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.
-
-