Module jdk.javadoc

Interface AnnotationDesc


  • @Deprecated(since="9",
                forRemoval=true)
    public interface AnnotationDesc
    Deprecated, for removal: This API element is subject to removal in a future version.
    The declarations in this package have been superseded by those in the package jdk.javadoc.doclet. For more information, see the Migration Guide in the documentation for that package.
    Represents an annotation. An annotation associates a value with each element of an annotation type.
    Since:
    1.5
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  AnnotationDesc.ElementValuePair
      Deprecated, for removal: This API element is subject to removal in a future version.
      The declarations in this package have been superseded by those in the package jdk.javadoc.doclet.
    • Method Detail

      • annotationType

        AnnotationTypeDoc annotationType()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the annotation type of this annotation.
        Returns:
        the annotation type of this annotation.
      • elementValues

        AnnotationDesc.ElementValuePair[] elementValues()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns this annotation's elements and their values. Only those explicitly present in the annotation are included, not those assuming their default values. Returns an empty array if there are none.
        Returns:
        this annotation's elements and their values.
      • isSynthesized

        boolean isSynthesized()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Check for the synthesized bit on the annotation.
        Returns:
        true if the annotation is synthesized.