インタフェースIncrementInstruction
- すべてのスーパー・インタフェース:
ClassFileElement
,CodeElement
,Instruction
public sealed interface IncrementInstruction extends Instruction
Code
属性のcode
配列のローカル変数増分命令をモデル化します。 対応するopcodesのkindはOpcode.Kind.INCREMENT
です。 CodeModel
の要素をトラバースするときに、CodeElement
として提供されます。
ローカル変数の増分命令はコンポジットです:
IncrementInstruction
(
int slot
,
int constant
)
slot
は、[0, 65535]
内に存在する必要があります。constant
は、[-32768, 32767]
内に存在する必要があります。
- Java Virtual Machine仕様を参照してください:
-
6.5.iinc iinc
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明int
constant()
増分する値を返します。static IncrementInstruction
of
(int slot, int constant) 増分命令を返します。int
slot()
増分するローカル変数スロットを返します。インタフェースjava.lang.classfile.Instructionで宣言されたメソッド
opcode, sizeInBytes
-
メソッドの詳細
-
slot
int slot()増分するローカル変数スロットを返します。- 戻り値:
- 増分するローカル変数スロット
-
constant
int constant()増分する値を返します。- 戻り値:
- 増分する値
-
of
static IncrementInstruction of(int slot, int constant) 増分命令を返します。slot
は、[0, 65535]
内に存在する必要があります。constant
は、[-32768, 32767]
内に存在する必要があります。
- パラメータ:
slot
- 増分するローカル変数スロットconstant
- 増分する値- 戻り値:
- 増分命令
- スロー:
IllegalArgumentException
-slot
またはconstant
が範囲外の場合
-