Interface ConstantInstruction.ArgumentConstantInstruction
- All Superinterfaces:
- ClassFileElement,- CodeElement,- ConstantInstruction,- Instruction
- Enclosing interface:
- ConstantInstruction
public static sealed interface ConstantInstruction.ArgumentConstantInstruction
extends ConstantInstruction
Models an "argument constant" instruction, which encodes the
 constant value in the instruction directly. Includes 
 where:
 
bipush and sipush instructions.
 An argument constant instruction is composite:
ArgumentConstantInstruction(
    Opcode opcode,
    int constantValue
)
- opcodemust be one of- bipushor- sipush.
- constantValuemust be in the range of- byte,- [-128, 127], for- bipush, and in the range of- short,- [-32768, 32767], for- sipush.
- Since:
- 24
- See Also:
- 
Nested Class SummaryNested classes/interfaces declared in interface java.lang.classfile.instruction.ConstantInstructionConstantInstruction.ArgumentConstantInstruction, ConstantInstruction.IntrinsicConstantInstruction, ConstantInstruction.LoadConstantInstruction
- 
Method SummaryModifier and TypeMethodDescriptionReturns the constant value.default TypeKindtypeKind()Returns the computational type of the constant.Methods declared in interface java.lang.classfile.Instructionopcode, sizeInBytes
- 
Method Details- 
constantValueInteger constantValue()Description copied from interface:ConstantInstructionReturns the constant value.- Specified by:
- constantValuein interface- ConstantInstruction
- Returns:
- the constant value
 
- 
typeKindDescription copied from interface:ConstantInstructionReturns the computational type of the constant. This is derived from theconstantValue.- Specified by:
- typeKindin interface- ConstantInstruction
- Returns:
- the computational type of the constant
 
 
-