Class AnnotationDescription.Latent.Loadable<S extends 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 Annotation> extends AnnotationDescription.AbstractBase implements AnnotationDescription.Loadable<S>
A loadable annotation description of a latent annotation description.
  • Field Details

    • annotationType

      private final Class<S extends Annotation> annotationType
      The annotation type.
  • Constructor Details

    • Loadable

      protected Loadable(Class<S> annotationType)
      Creates a loadable version of a latent annotation description.
      Parameters:
      annotationType - The annotation type.
  • Method Details

    • 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 interface AnnotationDescription.Loadable<S extends Annotation>
      Returns:
      A loaded version of this annotation description.
    • getValue

      public AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
      Returns a value of this annotation.
      Specified by:
      getValue in interface AnnotationDescription
      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 interface AnnotationDescription
      Returns:
      A description of the annotation type of this annotation.
    • prepare

      public <T extends Annotation> AnnotationDescription.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.
      Specified by:
      prepare in interface AnnotationDescription
      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.