Interface AnnotationDescription

All Known Subinterfaces:
AnnotationDescription.Loadable<S>
All Known Implementing Classes:
AnnotationDescription.AbstractBase, AnnotationDescription.ForLoadedAnnotation, AnnotationDescription.Latent, AnnotationDescription.Latent.Loadable, TypePool.Default.LazyTypeDescription.LazyAnnotationDescription, TypePool.Default.LazyTypeDescription.LazyAnnotationDescription.Loadable

public interface AnnotationDescription
An annotation description describes Annotation meta data of a class without this class being required to be loaded. All values of an annotation are therefore represented in unloaded state: An annotation can however be loaded in order to access unwrapped values. This will cause a loading of the classes of these values.
  • Field Details

  • Method Details

    • getValue

      AnnotationValue<?,?> getValue(String property)
      Returns a value of this annotation.
      Parameters:
      property - The name of the property being accessed.
      Returns:
      The value for the supplied property.
    • getValue

      Returns a value of this annotation.
      Parameters:
      property - The property being accessed.
      Returns:
      The value for the supplied property.
    • getAnnotationType

      TypeDescription getAnnotationType()
      Returns a description of the annotation type of this annotation.
      Returns:
      A description of the annotation type of this annotation.
    • prepare

      <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.
      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.
    • getRetention

      RetentionPolicy getRetention()
      Returns this annotation's retention policy.
      Returns:
      This annotation's retention policy.
    • getElementTypes

      Set<ElementType> getElementTypes()
      Returns a set of all ElementTypes that can declare this annotation.
      Returns:
      A set of all element types that can declare this annotation.
    • isSupportedOn

      boolean isSupportedOn(ElementType elementType)
      Checks if this annotation is supported on the supplied element type.
      Parameters:
      elementType - The element type to check.
      Returns:
      true if the supplied element type is supported by this annotation.
    • isSupportedOn

      boolean isSupportedOn(String elementType)
      Checks if this annotation is supported on the supplied element type.
      Parameters:
      elementType - The element type to check.
      Returns:
      true if the supplied element type is supported by this annotation.
    • isInherited

      boolean isInherited()
      Checks if this annotation is inherited.
      Returns:
      true if this annotation is inherited.
      See Also:
    • isDocumented

      boolean isDocumented()
      Checks if this annotation is documented.
      Returns:
      true if this annotation is documented.
      See Also: