Package net.bytebuddy.pool
Class TypePool.Default.LazyTypeDescription.LazyAnnotationDescription.Loadable<S extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationDescription.AbstractBase
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyAnnotationDescription
-
- net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyAnnotationDescription.Loadable<S>
-
- Type Parameters:
S
- The annotation type.
- All Implemented Interfaces:
AnnotationDescription
,AnnotationDescription.Loadable<S>
- Enclosing class:
- TypePool.Default.LazyTypeDescription.LazyAnnotationDescription
private static class TypePool.Default.LazyTypeDescription.LazyAnnotationDescription.Loadable<S extends java.lang.annotation.Annotation> extends TypePool.Default.LazyTypeDescription.LazyAnnotationDescription implements AnnotationDescription.Loadable<S>
A loadable version of a lazy 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 loaded annotation type.-
Fields inherited from class net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyAnnotationDescription
typePool, values
-
Fields inherited from interface net.bytebuddy.description.annotation.AnnotationDescription
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Loadable(TypePool typePool, java.lang.Class<S> annotationType, java.util.Map<java.lang.String,AnnotationValue<?,?>> values)
Creates a new loadable version of a lazy annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S
load()
Loads this annotation description.-
Methods inherited from class net.bytebuddy.pool.TypePool.Default.LazyTypeDescription.LazyAnnotationDescription
asList, asListOfNullable, getAnnotationType, getValue, prepare
-
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
getAnnotationType, getElementTypes, getRetention, getValue, isDocumented, isInherited, prepare
-
-
-
-
Field Detail
-
annotationType
private final java.lang.Class<S extends java.lang.annotation.Annotation> annotationType
The loaded annotation type.
-
-
Constructor Detail
-
Loadable
private Loadable(TypePool typePool, java.lang.Class<S> annotationType, java.util.Map<java.lang.String,AnnotationValue<?,?>> values)
Creates a new loadable version of a lazy annotation.- Parameters:
typePool
- The type pool to be used for looking up linked types.annotationType
- The annotation's loaded type.values
- A map of annotation value names to their value representations.
-
-
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.
-
-