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.BRANCH
PREVIEW. Delivered as a CodeElement
PREVIEW when traversing the elements of a CodeModel
PREVIEW.- 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.BRANCH
PREVIEWtarget
- the target of the branch- Returns:
- a branch instruction
- Throws:
IllegalArgumentException
- if the opcode kind is notOpcode.Kind.BRANCH
PREVIEW.
-
BranchInstruction
when preview features are enabled.