Interface StoreInstruction
- All Superinterfaces:
ClassFileElementPREVIEW
,CodeElementPREVIEW
,InstructionPREVIEW
StoreInstruction
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 local variable store instruction in the
code
array of a
Code
attribute. Corresponding opcodes will have a kind
of
Opcode.Kind.STORE
PREVIEW. Delivered as a CodeElement
PREVIEW when
traversing the elements of a CodeModel
PREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic StoreInstructionPREVIEW
Returns a local variable store instruction.static StoreInstructionPREVIEW
Returns a local variable store instruction.int
slot()
Returns the local variable slot to store to.typeKind()
Returns the type of the value to be stored.Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
slot
int slot()Returns the local variable slot to store to.- Returns:
- the local variable slot to store to
-
typeKind
-
of
Returns a local variable store instruction.- Parameters:
kind
- the type of the value to be storedslot
- the local variable slot to store to- Returns:
- a local variable store instruction
-
of
Returns a local variable store instruction.- Parameters:
op
- the opcode for the specific type of store instruction, which must be of kindOpcode.Kind.STORE
PREVIEWslot
- the local variable slot to store to- Returns:
- a local variable store instruction
- Throws:
IllegalArgumentException
- if the opcode kind is notOpcode.Kind.STORE
PREVIEW.
-
StoreInstruction
when preview features are enabled.