AnnotationTypeDoc (Doclet API )
Keywords: com.sun.javadoc.AnnotationTypeDoc interface
Date: 2026-04-24

com.sun.javadoc

## Interface AnnotationTypeDoc

- All Superinterfaces:
    ClassDoc, Comparable<Object>, Doc, ProgramElementDoc, Type

      public interface AnnotationTypeDoc
      extends ClassDoc

  Represents an annotation type.
  Since:
    1.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnnotationTypeElementDoc[]` | `elements()` Returns the elements of this annotation type.

    - ### Methods inherited from interface com.sun.javadoc.ClassDoc

      `constructors, constructors, definesSerializableFields, enumConstants, fields, fields, findClass, importedClasses, importedPackages, innerClasses, innerClasses, interfaces, interfaceTypes, isAbstract, isExternalizable, isSerializable, methods, methods, serializableFields, serializationMethods, subclassOf, superclass, superclassType, typeParameters, typeParamTags`

    - ### Methods inherited from interface com.sun.javadoc.ProgramElementDoc

      `annotations, containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier, qualifiedName`

    - ### Methods inherited from interface com.sun.javadoc.Doc

      `commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isClass, isConstructor, isEnum, isEnumConstant, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, name, position, seeTags, setRawCommentText, tags, tags`

    - ### Methods inherited from interface com.sun.javadoc.Type

      `asAnnotatedType, asAnnotationTypeDoc, asClassDoc, asParameterizedType, asTypeVariable, asWildcardType, dimension, getElementType, isPrimitive, qualifiedTypeName, simpleTypeName, toString, typeName`

- - ### Method Detail

    - #### elements

          AnnotationTypeElementDoc[] elements()

      Returns the elements of this annotation type. Returns an empty array if there are none.
      Returns:
        the elements of this annotation type.

Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.