インタフェースFieldInstruction
- すべてのスーパー・インタフェース:
ClassFileElement
,CodeElement
,Instruction
public sealed interface FieldInstruction extends Instruction
Code
属性のcode
配列内のフィールド・アクセス命令をモデル化します。 対応するopcodesのkindはOpcode.Kind.FIELD_ACCESS
です。 CodeModel
の要素をトラバースするときに、CodeElement
として提供されます。
フィールド・アクセス指示はコンポジットです:
FieldInstruction
(
Opcode opcode
,
FieldRefEntry field
,
)
- 導入されたバージョン:
- 24
- 関連項目:
-
メソッドのサマリー
修飾子と型メソッド説明field()
この命令で記述されたFieldRefEntry
定数を返します。default Utf8Entry
name()
フィールドの名前を返します。static FieldInstruction
of
(Opcode op, ClassEntry owner, NameAndTypeEntry nameAndType) フィールド・アクセス指示を返します。static FieldInstruction
of
(Opcode op, ClassEntry owner, Utf8Entry name, Utf8Entry type) フィールド・アクセス指示を返します。static FieldInstruction
of
(Opcode op, FieldRefEntry field) フィールド・アクセス指示を返します。default ClassEntry
owner()
フィールドを保持するクラスを返します。default Utf8Entry
type()
フィールドのフィールド記述子文字列を返します。default ClassDesc
フィールドの型のシンボリック記述子を返します。インタフェースjava.lang.classfile.Instructionで宣言されたメソッド
opcode, sizeInBytes
-
メソッドの詳細
-
field
-
owner
-
name
-
type
default Utf8Entry type()フィールドのフィールド記述子文字列を返します。- APIのノート:
- フィールドのタイプのシンボリック記述子は、
typeSymbol()
から入手できます。 - 戻り値:
- フィールドのフィールド記述子文字列
-
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
でない場合。
-