インタフェースIncrementInstruction

すべてのスーパー・インタフェース:
ClassFileElement, CodeElement, Instruction

public sealed interface IncrementInstruction extends Instruction
Code属性のcode配列のローカル変数増分命令をモデル化します。 対応するopcodesのkindOpcode.Kind.INCREMENTです。 CodeModelの要素をトラバースするときに、CodeElementとして提供されます。

ローカル変数の増分命令はコンポジットです:

IncrementInstruction(
    int slot,
    int constant
)
where
  • slotは、[0, 65535]内に存在する必要があります。
  • constantは、[-32768, 32767]内に存在する必要があります。

Java Virtual Machine仕様を参照してください:
6.5.iinc iinc
導入されたバージョン:
24
関連項目:
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    int
    増分する値を返します。
    of(int slot, int constant)
    増分命令を返します。
    int
    増分するローカル変数スロットを返します。

    インタフェース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が範囲外の場合