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.STOREPREVIEW. Delivered as a CodeElementPREVIEW when
traversing the elements of a CodeModelPREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic StoreInstructionPREVIEWReturns a local variable store instruction.static StoreInstructionPREVIEWReturns a local variable store instruction.intslot()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
- Throws:
IllegalArgumentException- ifkindisvoidPREVIEW orslotis out of range
-
of
Returns a local variable store instruction.- Parameters:
op- the opcode for the specific type of store instruction, which must be of kindOpcode.Kind.STOREPREVIEWslot- the local variable slot to store to- Returns:
- a local variable store instruction
- Throws:
IllegalArgumentException- if the opcode kind is notOpcode.Kind.STOREPREVIEW orslotis out of range
-
StoreInstructionwhen preview features are enabled.