Interface ConstantValueAttribute

All Superinterfaces:
AttributePREVIEW<ConstantValueAttributePREVIEW>, ClassFileElementPREVIEW, FieldElementPREVIEW

public sealed interface ConstantValueAttribute extends AttributePREVIEW<ConstantValueAttributePREVIEW>, FieldElementPREVIEW
ConstantValueAttribute is a preview API of the Java platform.
Programs can only use ConstantValueAttribute when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the ConstantValue attribute (JVMS 4.7.2), which can appear on fields and indicates that the field's value is a constant. Delivered as a FieldElementPREVIEW when traversing the elements of a FieldModelPREVIEW.

The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.

Since:
22