Interface AnnotationValue

@Deprecated(since="9",
            forRemoval=true)
public interface AnnotationValue
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 a value of an annotation type element.

Since:
1.5

Methods

Modifier and Type Method Description
String toString()

Deprecated, for removal: This API element is subject to removal in a future version.

Returns a string representation of the value.

Object value()

Deprecated, for removal: This API element is subject to removal in a future version.

Returns the value.

Methods

value

Object value()
Deprecated, for removal: This API element is subject to removal in a future version.

Returns the value. The type of the returned object is one of the following:

  • a wrapper class for a primitive type
  • String
  • Type (representing a class literal)
  • FieldDoc (representing an enum constant)
  • AnnotationDesc
  • AnnotationValue[]

Returns:
the value.

toString

String toString()
Deprecated, for removal: This API element is subject to removal in a future version.

Returns a string representation of the value.

Overrides:
toString in class Object
Returns:
the text of a Java language annotation value expression whose value is the value of this element.

© 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/AnnotationValue.html