Interface DiscontinuedInstruction.JsrInstruction
- All Superinterfaces:
ClassFileElementPREVIEW
,CodeElementPREVIEW
,DiscontinuedInstructionPREVIEW
,InstructionPREVIEW
- Enclosing interface:
DiscontinuedInstructionPREVIEW
public static sealed interface DiscontinuedInstruction.JsrInstruction
extends DiscontinuedInstructionPREVIEW
JsrInstruction
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 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
PREVIEW. Delivered as a CodeElement
PREVIEW
when traversing the elements of a CodeModel
PREVIEW.- Since:
- 22
-
Nested Class Summary
Nested classes/interfaces declared in interface java.lang.classfile.instruction.DiscontinuedInstructionPREVIEW
DiscontinuedInstruction.JsrInstructionPREVIEW, DiscontinuedInstruction.RetInstructionPREVIEW
-
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.InstructionPREVIEW
opcode, sizeInBytes
-
Method Details
-
target
-
of
Returns a JSR instruction.- Parameters:
op
- the opcode for the specific type of JSR instruction, which must be of kindOpcode.Kind.DISCONTINUED_JSR
PREVIEWtarget
- target label of the subroutine- Returns:
- a JSR instruction
- Throws:
IllegalArgumentException
- if the opcode kind is notOpcode.Kind.DISCONTINUED_JSR
PREVIEW.
-
of
Returns a JSR instruction.- Parameters:
target
- target label of the subroutine- Returns:
- a JSR instruction
-
JsrInstruction
when preview features are enabled.