インタフェースInvokeInstruction

すべてのスーパー・インタフェース:
ClassFileElementPREVIEW, CodeElementPREVIEW, InstructionPREVIEW

public sealed interface InvokeInstruction extends InstructionPREVIEW
InvokeInstructionは、JavaプラットフォームのプレビューAPIです。
プレビュー機能が有効な場合のみ、プログラムでInvokeInstructionを使用できます。
プレビュー機能は、今後のリリースで削除するか、Javaプラットフォームの永続機能にアップグレードすることができます。
invokedynamic以外の、 Code属性のcode配列内のメソッド呼出し命令をモデル化します。 対応するopcodeのkindは、Opcode.Kind.INVOKEPREVIEWになります。 CodeModelPREVIEWの要素をトラバースするときに、CodeElementPREVIEWとして提供されます。
導入されたバージョン:
22
  • メソッドの詳細

    • method

      この命令によって記述されたMethodRefEntryPREVIEWまたはInterfaceMethodRefEntryPREVIEW定数を返します。
      戻り値:
      この命令で記述されるMethodRefEntryPREVIEWまたはInterfaceMethodRefEntryPREVIEW定数
    • isInterface

      boolean isInterface()
      メソッドを保持しているクラスがインタフェースであるかどうかを返します。
      戻り値:
      メソッドを保持するクラスがインタフェースかどうか
    • count

      int count()
      invokespecialinvokestaticおよびinvokevirtual命令の6.5または0で定義されている、invokeinterface命令のcount値を返します。
      戻り値:
      invokespecialinvokestaticおよびinvokevirtual命令の6.5または0で定義されている、invokeinterface命令のcount
    • owner

      default ClassEntryPREVIEW owner()
      メソッドを保持するクラスを返します。
      戻り値:
      メソッドを保持するクラス
    • name

      default Utf8EntryPREVIEW name()
      メソッドの名前を返します。
      戻り値:
      メソッドの名前
    • type

      default Utf8EntryPREVIEW type()
      メソッドのメソッド記述子を返します。
      戻り値:
      メソッドのメソッド記述子
    • typeSymbol

      default MethodTypeDesc typeSymbol()
      メソッド・タイプのシンボリック記述子を返します。
      戻り値:
      メソッド型のシンボリック記述子
    • of

      invocation instructionを返します。
      パラメータ:
      op - 特定のタイプの呼出し命令のopcode。Opcode.Kind.INVOKEPREVIEW型である必要があります
      method - メソッドを記述する定数プール・エントリ
      戻り値:
      invocation instruction
      例外:
      IllegalArgumentException - opcodeの種類がOpcode.Kind.INVOKEPREVIEWでない場合。
    • of

      static InvokeInstructionPREVIEW of(OpcodePREVIEW op, ClassEntryPREVIEW owner, Utf8EntryPREVIEW name, Utf8EntryPREVIEW type, boolean isInterface)
      invocation instructionを返します。
      パラメータ:
      op - 特定のタイプの呼出し命令のopcode。Opcode.Kind.INVOKEPREVIEW型である必要があります
      owner - メソッドを保持するクラス
      name - メソッドの名前
      type - メソッド記述子
      isInterface - メソッドを保持するクラスがインタフェースかどうか
      戻り値:
      invocation instruction
    • of

      static InvokeInstructionPREVIEW of(OpcodePREVIEW op, ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType, boolean isInterface)
      invocation instructionを返します。
      パラメータ:
      op - 特定のタイプの呼出し命令のopcode。Opcode.Kind.INVOKEPREVIEW型である必要があります
      owner - メソッドを保持するクラス
      nameAndType - メソッドの名前とタイプ
      isInterface - メソッドを保持するクラスがインタフェースかどうか
      戻り値:
      invocation instruction