Class AnnotationTypeDeclaration


  • public class AnnotationTypeDeclaration
    extends AbstractTypeDeclaration
    Annotation type declaration AST node type (added in JLS3 API).
     AnnotationTypeDeclaration:
       [ Javadoc ] { ExtendedModifier } @ interface Identifier
                    { { AnnotationTypeBodyDeclaration | ; } }
     AnnotationTypeBodyDeclaration:
       AnnotationTypeMemberDeclaration
       FieldDeclaration
       TypeDeclaration
       EnumDeclaration
       AnnotationTypeDeclaration
     

    The thing to note is that method declaration are replaced by annotation type member declarations in this context.

    When a Javadoc comment is present, the source range begins with the first character of the "/**" comment delimiter. When there is no Javadoc comment, the source range begins with the first character of the first modifier keyword (if modifiers), or the first character of the "@interface" (if no modifiers). The source range extends through the last character of the "}" token following the body declarations.

    Since:
    3.1
    Restriction:
    This class is not intended to be instantiated by clients.
    • Method Detail

      • propertyDescriptors

        public static List propertyDescriptors​(int apiLevel)
        Returns a list of structural property descriptors for this node type. Clients must not modify the result.
        Parameters:
        apiLevel - the API level; one of the AST.JLS* constants
        Returns:
        a list of property descriptors (element type: StructuralPropertyDescriptor)