Interface ConstantValueEntry
- All Superinterfaces:
ClassFileElementPREVIEW,LoadableConstantEntryPREVIEW,PoolEntryPREVIEW,WritableElementPREVIEW<PoolEntryPREVIEW>
- All Known Subinterfaces:
DoubleEntryPREVIEW,FloatEntryPREVIEW,IntegerEntryPREVIEW,LongEntryPREVIEW,StringEntryPREVIEW
public sealed interface ConstantValueEntry
extends LoadableConstantEntryPREVIEW
permits DoubleEntryPREVIEW, FloatEntryPREVIEW, IntegerEntryPREVIEW, LongEntryPREVIEW, StringEntryPREVIEW
ConstantValueEntry is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a constant pool entry that can be used as the constant in a
ConstantValue attribute; this includes the four primitive constant
types and String constants.-
Method Summary
Methods declared in interface java.lang.classfile.constantpool.LoadableConstantEntryPREVIEW
typeKindMethods declared in interface java.lang.classfile.constantpool.PoolEntryPREVIEW
constantPool, index, tag, widthMethods declared in interface java.lang.classfile.WritableElementPREVIEW
writeTo
-
Method Details
-
constantValue
ConstantDesc constantValue()- Specified by:
constantValuein interfaceLoadableConstantEntryPREVIEW- Returns:
- the constant value
-
ConstantValueEntrywhen preview features are enabled.