- すべてのスーパー・インタフェース:
ClassFileElementPREVIEW,CodeElementPREVIEW,InstructionPREVIEW
- 既知のすべてのサブインタフェース:
ConstantInstruction.ArgumentConstantInstructionPREVIEW,ConstantInstruction.IntrinsicConstantInstructionPREVIEW,ConstantInstruction.LoadConstantInstructionPREVIEW
public sealed interface ConstantInstruction extends InstructionPREVIEW permits ConstantInstruction.IntrinsicConstantInstructionPREVIEW, ConstantInstruction.ArgumentConstantInstructionPREVIEW, ConstantInstruction.LoadConstantInstructionPREVIEW
ConstantInstructionは、JavaプラットフォームのプレビューAPIです。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
"intrinsic constant"命令(e.g.,
iconst_0)、"argument constant"命令(e.g., bipush)、"load constant"命令(e.g., LDC)など、 Code属性のcode配列内の定数ロード命令をモデル化します。 対応するopcodeのkindは、Opcode.Kind.CONSTANTPREVIEWになります。 CodeModelPREVIEWの要素をトラバースするときに、CodeElementPREVIEWとして提供されます。 - 導入されたバージョン:
- 22
-
ネストされたクラスのサマリー
ネストされたクラス修飾子と型インタフェース説明static interfacePreview."argument constant"命令(e.g.,bipush)をモデル化します。static interfacePreview."intrinsic constant"命令(e.g.,iconst_0)をモデル化します。static interfacePreview."load constant"命令(e.g.,ldc)をモデル化します。 -
メソッドのサマリー
修飾子と型メソッド説明定数値を返します。ofArgument(OpcodePREVIEW op, int value) 引数定数命令を返します。組み込み定数命令を返します。ofLoad(OpcodePREVIEW op, LoadableConstantEntryPREVIEW constant) ロード定数命令を返します。typeKind()定数の型を返します。インタフェースjava.lang.classfile.InstructionPREVIEWで宣言されたメソッド
opcode, sizeInBytes
-
メソッドの詳細
-
constantValue
-
typeKind
-
ofIntrinsic
static ConstantInstruction.IntrinsicConstantInstructionPREVIEW ofIntrinsic(OpcodePREVIEW op) 組み込み定数命令を返します。- パラメータ:
op- 固有定数命令の特定のタイプのopcode。Opcode.Kind.CONSTANTPREVIEW型である必要があります- 戻り値:
- 組み込み定数命令
-
ofArgument
static ConstantInstruction.ArgumentConstantInstructionPREVIEW ofArgument(OpcodePREVIEW op, int value) 引数定数命令を返します。- パラメータ:
op- 固有定数命令の特定のタイプのopcode。Opcode.Kind.CONSTANTPREVIEW型である必要がありますvalue- 定数値- 戻り値:
- 引数定数命令
-
ofLoad
static ConstantInstruction.LoadConstantInstructionPREVIEW ofLoad(OpcodePREVIEW op, LoadableConstantEntryPREVIEW constant) ロード定数命令を返します。- パラメータ:
op- 特定のタイプのロード定数命令のopcode。Opcode.Kind.CONSTANTPREVIEW型である必要がありますconstant- 定数値- 戻り値:
- ロード定数命令
-
ConstantInstructionを使用できます。