Interface StackInstruction
- All Superinterfaces:
ClassFileElementPREVIEW,CodeElementPREVIEW,InstructionPREVIEW
StackInstruction 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 stack manipulation instruction in the
code array of a
Code attribute. Corresponding opcodes will have a kind of
Opcode.Kind.STACKPREVIEW. Delivered as a CodeElementPREVIEW when
traversing the elements of a CodeModelPREVIEW.- Since:
- 22
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StackInstructionPREVIEWReturns a stack manipulation instruction.Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
of
Returns a stack manipulation instruction.- Parameters:
op- the opcode for the specific type of stack instruction, which must be of kindOpcode.Kind.STACKPREVIEW- Returns:
- a stack manipulation instruction
- Throws:
IllegalArgumentException- if the opcode kind is notOpcode.Kind.STACKPREVIEW.
-
StackInstructionwhen preview features are enabled.