CONSTANT_Dynamic_info structure, representing a dynamically-computed constant, in the constant pool of a class file.
The use of a ConstantDynamicEntry is modeled by a DynamicConstantDesc. Conversions are through asSymbol() and ConstantPoolBuilder#constantDynamicEntry(DynamicConstantDesc).
A dynamic constant entry is composite:
ConstantDynamicEntry( BootstrapMethodEntry bootstrap, NameAndTypeEntry nameAndType )
nameAndType.type() is a field descriptor string.
API Note
A dynamically-computed constant is frequently called a dynamic constant, or a condy, from the abbreviation of "constant dynamic".
CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures
ConstantPoolBuilder::constantDynamicEntry, DynamicConstantDesc, Dynamically-computed constants
| Modifier and Type | Method and Description |
|---|---|
| public default DynamicConstantDesc | Returns: a symbolic descriptor for this dynamically-computed constantReturns a symbolic descriptor for this dynamically-computed constant. |
| public default ConstantDesc | constantValue()
Implements java. Returns a symbolic descriptor of this constant. |
| public default TypeKind | typeKind()
Overrides default java. Returns the data type of this constant. |
| public default ClassDesc | Returns: a symbolic descriptor for the field type of this dynamically-computed constantReturns a symbolic descriptor for the field type of this dynamically-computed constant. |
| asSymbol | back to summary |
|---|---|
| public default DynamicConstantDesc Returns a symbolic descriptor for this dynamically-computed constant.
| |
| constantValue | back to summary |
|---|---|
| public default ConstantDesc constantValue() Implements java. Doc from java. Returns a symbolic descriptor of this constant.
This is equivalent to
| |
| typeKind | back to summary |
|---|---|
| public default TypeKind typeKind() Overrides default java. Doc from java. Returns the data type of this constant.
If the data type is of category 2, this
constant must be loaded with API Note The data type of a dynamically-computed constant depends on its descriptor, while the data type of all other constants can be determined by their constant type.
| |
| typeSymbol | back to summary |
|---|---|
| public default ClassDesc typeSymbol() Returns a symbolic descriptor for the field type of this dynamically-computed constant.
| |