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.
  • Field Details

    • annotationType

      private final TypeDescription annotationType
      The type of the annotation.
    • annotationValues

      private final Map<String,? extends AnnotationValue<?,?>> 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

      public AnnotationValue<?,?> getValue(MethodDescription.InDefinedShape property)
      Returns a 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 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.