Interface AnnotationConstantValueEntry

All Superinterfaces:
PoolEntryPREVIEW
All Known Subinterfaces:
DoubleEntryPREVIEW, FloatEntryPREVIEW, IntegerEntryPREVIEW, LongEntryPREVIEW, Utf8EntryPREVIEW

public sealed interface AnnotationConstantValueEntry extends PoolEntryPREVIEW permits DoubleEntryPREVIEW, FloatEntryPREVIEW, IntegerEntryPREVIEW, LongEntryPREVIEW, Utf8EntryPREVIEW
AnnotationConstantValueEntry is a preview API of the Java platform.
Programs can only use AnnotationConstantValueEntry when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A constant pool entry that may be used by annotation constant values, which includes the four kinds of primitive constants and UTF8 constants. These entries are also the only entries that do not refer to other constant pool entries.
API Note:
An annotation constant value entry alone is not sufficient to determine the annotation constant; for example, an IntegerEntryPREVIEW of 1 can mean true in AnnotationValue.OfBooleanPREVIEW or 1 in AnnotationValue.OfIntPREVIEW.
Since:
22
See Also:
  • Method Details

    • constantValue

      ConstantDesc constantValue()
      Returns the constant value. The constant value will be an Integer, Long, Float, Double for the primitive constants, or String for UTF8 constants.
      Returns:
      the constant value