Top Description Methods
java.lang.classfile.constantpool

public sealed Interface AnnotationConstantValueEntry

extends PoolEntry
Known Direct Subinterfaces
java.lang.classfile.constantpool.DoubleEntry, java.lang.classfile.constantpool.FloatEntry, java.lang.classfile.constantpool.IntegerEntry, java.lang.classfile.constantpool.LongEntry, java.lang.classfile.constantpool.Utf8Entry
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.constant.ConstantDesc, jdk.internal.javac.PreviewFeature

A constant pool entry that may be used as an annotation constant, which includes the four kinds of primitive constants, and UTF8 constants.
Since
22

Method Summary

Modifier and TypeMethod and Description
public ConstantDesc

Returns:

the constant value
constantValue
()

Returns the constant value.

Inherited from java.lang.classfile.constantpool.PoolEntry:
constantPoolindextagwidth

Method Detail

constantValueback to summary
public ConstantDesc constantValue()

Returns the constant value. The constant value will be an Integer, Long, Float, Double, or String.

Returns:ConstantDesc

the constant value