Interface BranchInstruction
- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
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. Delivered as a CodeElement when traversing the elements of a CodeModel.- Since:
- 24
-
Method Summary
Methods declared in interface java.lang.classfile.Instruction
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.BRANCHtarget- the target of the branch- Returns:
- a branch instruction
- Throws:
IllegalArgumentException- if the opcode kind is notOpcode.Kind.BRANCH.
-