Interface BranchInstruction
- All Superinterfaces:
ClassFileElementPREVIEW,CodeElementPREVIEW,InstructionPREVIEW
BranchInstruction 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 branching instruction (conditional or unconditional) in the
code array of a Code attribute. Corresponding opcodes will have a
kind of Opcode.Kind.BRANCHPREVIEW. Delivered as a CodeElementPREVIEW when traversing the elements of a CodeModelPREVIEW.- Since:
- 22
-
Method Summary
Methods declared in interface java.lang.classfile.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
target
-
of
Returns a branch instruction.- Parameters:
op- the opcode for the specific type of branch instruction, which must be of kindOpcode.Kind.BRANCHPREVIEWtarget- the target of the branch- Returns:
- a branch instruction
- Throws:
IllegalArgumentException- if the opcode kind is notOpcode.Kind.BRANCHPREVIEW.
-
BranchInstructionwhen preview features are enabled.