ConstantValue attribute (JVMS
4.7.2), which indicates this field's value is a constant and that
constant value.
This attribute only appears on fields, and does not permit multiple instances in a field. It has a data dependency on the constant pool.
This attribute was introduced in the Java Platform version 1.0.2, major version 45.
ConstantValue Attribute
Attributes#constantValue()
| Modifier and Type | Method and Description |
|---|---|
| public ConstantValueEntry | |
| public static ConstantValueAttribute | Returns: aConstantValue attributethe constant value value)Returns a |
| public static ConstantValueAttribute | Returns: aConstantValue attributethe constant value value)Returns a |
| constant | back to summary |
|---|---|
| public ConstantValueEntry constant() Returns the constant value of the field.
| |
| of | back to summary |
|---|---|
| public static ConstantValueAttribute of(ConstantValueEntry value) Returns a
| |
| of | back to summary |
|---|---|
| public static ConstantValueAttribute of(ConstantDesc value) Returns a
| |