インタフェースFieldInstruction

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

public sealed interface FieldInstruction extends Instruction
Code属性のcode配列内のフィールド・アクセス命令をモデル化します。 対応するopcodesのkindOpcode.Kind.FIELD_ACCESSです。 CodeModelの要素をトラバースするときに、CodeElementとして提供されます。

フィールド・アクセス指示はコンポジットです:

FieldInstruction(
    Opcode opcode,
    FieldRefEntry field,
)

導入されたバージョン:
24
関連項目:
  • メソッドの詳細

    • field

      FieldRefEntry field()
      この命令で記述されたFieldRefEntry定数を返します。
      戻り値:
      この命令で記述されたFieldRefEntry定数
    • owner

      default ClassEntry owner()
      フィールドを保持するクラスを返します。
      戻り値:
      フィールドを保持するクラス
    • name

      default Utf8Entry name()
      フィールドの名前を返します。
      戻り値:
      フィールドの名前
    • type

      default Utf8Entry type()
      フィールドのフィールド記述子文字列を返します。
      APIのノート:
      フィールドのタイプのシンボリック記述子は、typeSymbol()から入手できます。
      戻り値:
      フィールドのフィールド記述子文字列
    • typeSymbol

      default ClassDesc typeSymbol()
      フィールドの型のシンボリック記述子を返します。
      戻り値:
      フィールドの型のシンボリック記述子
    • of

      static FieldInstruction of(Opcode op, FieldRefEntry field)
      フィールド・アクセス指示を返します。
      パラメータ:
      op - 特定のタイプのフィールド・アクセス命令のopcode。Opcode.Kind.FIELD_ACCESSの種類である必要があります
      field - フィールドを記述する定数プール・エントリ
      戻り値:
      フィールド・アクセス指示
      スロー:
      IllegalArgumentException - opcodeの種類がOpcode.Kind.FIELD_ACCESSでない場合。
    • of

      static FieldInstruction of(Opcode op, ClassEntry owner, Utf8Entry name, Utf8Entry type)
      フィールド・アクセス指示を返します。
      パラメータ:
      op - 特定のタイプのフィールド・アクセス命令のopcode。Opcode.Kind.FIELD_ACCESSの種類である必要があります
      owner - フィールドを保持するクラス
      name - フィールドの名前
      type - フィールド記述子
      戻り値:
      フィールド・アクセス指示
      スロー:
      IllegalArgumentException - opcodeの種類がOpcode.Kind.FIELD_ACCESSでない場合。
    • of

      static FieldInstruction of(Opcode op, ClassEntry owner, NameAndTypeEntry nameAndType)
      フィールド・アクセス指示を返します。
      パラメータ:
      op - 特定のタイプのフィールド・アクセス命令のopcode。Opcode.Kind.FIELD_ACCESSの種類である必要があります
      owner - フィールドを保持するクラス
      nameAndType - フィールドの名前とフィールド記述子
      戻り値:
      フィールド・アクセス指示
      スロー:
      IllegalArgumentException - opcodeの種類がOpcode.Kind.FIELD_ACCESSでない場合。