Interface DiscontinuedInstruction.JsrInstruction
- All Superinterfaces:
ClassFileElement
,CodeElement
,DiscontinuedInstruction
,Instruction
- Enclosing interface:
DiscontinuedInstruction
public static sealed interface DiscontinuedInstruction.JsrInstruction
extends DiscontinuedInstruction
Models JSR and JSR_W instructions discontinued from the
code
array of a Code
attribute since class file version 51.0.
Corresponding opcodes will have a kind
of
Opcode.Kind.DISCONTINUED_JSR
. Delivered as a CodeElement
when traversing the elements of a CodeModel
.- Since:
- 24
-
Nested Class Summary
Nested classes/interfaces declared in interface java.lang.classfile.instruction.DiscontinuedInstruction
DiscontinuedInstruction.JsrInstruction, DiscontinuedInstruction.RetInstruction
-
Method Summary
Modifier and TypeMethodDescriptionReturns a JSR instruction.Returns a JSR instruction.target()
Returns the target of the JSR instruction.Methods declared in interface java.lang.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
target
Label target()Returns the target of the JSR instruction.- Returns:
- the target of the JSR instruction
-
of
Returns a JSR instruction.- Parameters:
op
- the opcode for the specific type of JSR instruction, which must be of kindOpcode.Kind.DISCONTINUED_JSR
target
- target label of the subroutine- Returns:
- a JSR instruction
- Throws:
IllegalArgumentException
- if the opcode kind is notOpcode.Kind.DISCONTINUED_JSR
.
-
of
Returns a JSR instruction.- Parameters:
target
- target label of the subroutine- Returns:
- a JSR instruction
-