Interface AnnotationDesc
@Deprecated(since="9", forRemoval=true) public interface AnnotationDesc
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 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 . |
Methods
Modifier and Type | Method | Description |
---|---|---|
AnnotationTypeDoc | annotationType() | Deprecated, for removal: This API element is subject to removal in a future version. Returns the annotation type of this annotation. |
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. |
boolean | isSynthesized() | Deprecated, for removal: This API element is subject to removal in a future version. Check for the synthesized bit on the annotation. |
Methods
annotationType
AnnotationTypeDoc annotationType()
Returns the annotation type of this annotation.
- Returns:
- the annotation type of this annotation.
elementValues
AnnotationDesc.ElementValuePair[] elementValues()
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()
Check for the synthesized bit on the annotation.
- Returns:
- true if the annotation is synthesized.
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/com/sun/javadoc/AnnotationDesc.html