Interface ConstantInstruction.LoadConstantInstruction
- All Superinterfaces:
ClassFileElementPREVIEW
,CodeElementPREVIEW
,ConstantInstructionPREVIEW
,InstructionPREVIEW
- Enclosing interface:
ConstantInstructionPREVIEW
public static sealed interface ConstantInstruction.LoadConstantInstruction
extends ConstantInstructionPREVIEW
LoadConstantInstruction
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 "load constant" instruction (e.g.,
ldc
).- Since:
- 22
-
Nested Class Summary
Nested classes/interfaces declared in interface java.lang.classfile.instruction.ConstantInstructionPREVIEW
ConstantInstruction.ArgumentConstantInstructionPREVIEW, ConstantInstruction.IntrinsicConstantInstructionPREVIEW, ConstantInstruction.LoadConstantInstructionPREVIEW
-
Method Summary
Modifier and TypeMethodDescriptionReturns the constant value.typeKind()
Returns the type of the constant.Methods declared in interface java.lang.classfile.instruction.ConstantInstructionPREVIEW
constantValue
Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
constantEntry
LoadableConstantEntryPREVIEW constantEntry()Returns the constant value.- Returns:
- the constant value
-
typeKind
Returns the type of the constant.- Specified by:
typeKind
in interfaceConstantInstructionPREVIEW
- Returns:
- the type of the constant
-
LoadConstantInstruction
when preview features are enabled.