インタフェースDiscontinuedInstruction.JsrInstruction
- すべてのスーパー・インタフェース:
ClassFileElement
,CodeElement
,DiscontinuedInstruction
,Instruction
- 含まれているインタフェース:
DiscontinuedInstruction
public static sealed interface DiscontinuedInstruction.JsrInstruction extends DiscontinuedInstruction
モデルは、クラス・ファイルのメジャー・バージョン51 (JVMS 4.9.1)以降、
Code
属性のcode
配列から中断されたサブルーチン命令をジャンプします。 対応するopcodesのkindはOpcode.Kind.DISCONTINUED_JSR
です。 CodeModel
の要素をトラバースするときに、CodeElement
として提供されます。
ジャンプ・サブルーチン命令はコンポジットです:
JsrInstruction
(Label target
)
物理的な制限により、jsr
命令はコード要素のリストでラベルを遠すぎてエンコードできません。 このような場合、ClassFile.ShortJumpsOption
は、無効なjsr
命令モデルがCodeBuilder
によってどのように書き込まれるかを制御します。
ジャンプ・サブルーチン命令はreturnAddress
値をオペランド・スタックにプッシュし、astore
シリーズの命令は、この値をローカル変数スロットに格納できます。
- APIのノート:
- ジャンプ・サブルーチン命令は中止され、
StackMapTable
属性を使用して(JVMS 4.10.1)タイプによる検証が強制されます。 - 導入されたバージョン:
- 24
- 関連項目:
-
ネストされたクラスのサマリー
インタフェースjava.lang.classfile.instruction.DiscontinuedInstructionで宣言されたネストされたクラス/インタフェース
DiscontinuedInstruction.JsrInstruction, DiscontinuedInstruction.RetInstruction
-
メソッドのサマリー
インタフェースjava.lang.classfile.Instructionで宣言されたメソッド
opcode, sizeInBytes
-
メソッドの詳細
-
target
-
of
static DiscontinuedInstruction.JsrInstruction of(Opcode op, Label target) ジャンプ・サブルーチン命令を返します。- APIのノート:
- 明示的な
op
引数を使用すると、短いジャンプを回避するためにjsr_w
命令を作成できます。 - パラメータ:
op
- 特定のタイプのジャンプ・サブルーチン命令のopcode。Opcode.Kind.DISCONTINUED_JSR
の種類である必要がありますtarget
- サブルーチンのターゲット・ラベル- 戻り値:
- ジャンプ・サブルーチン命令
- スロー:
IllegalArgumentException
- opcodeの種類がOpcode.Kind.DISCONTINUED_JSR
でない場合。
-
of
static DiscontinuedInstruction.JsrInstruction of(Label target) ジャンプ・サブルーチン命令を返します。- パラメータ:
target
- サブルーチンのターゲット・ラベル- 戻り値:
- ジャンプ・サブルーチン命令
-