インタフェースjava.lang.foreign.FunctionDescriptorの
使用
FunctionDescriptorを使用するパッケージ
-
java.lang.foreignでのFunctionDescriptorの使用
修飾子と型メソッド説明FunctionDescriptor.appendArgumentLayouts(MemoryLayout... addedLayouts) この関数記述子の引数レイアウトに、指定された引数レイアウトが追加された関数記述子を返します。FunctionDescriptor.changeReturnLayout(MemoryLayout newReturn) 指定された戻りレイアウトで関数記述子を返します。FunctionDescriptor.dropReturnLayout()戻りレイアウトのない新しい関数記述子を返します。FunctionDescriptor.insertArgumentLayouts(int index, MemoryLayout... addedLayouts) 指定された索引に挿入された引数レイアウトを持つ関数記述子を、この関数記述子の引数レイアウト配列に戻します。static FunctionDescriptorFunctionDescriptor.of(MemoryLayout resLayout, MemoryLayout... argLayouts) 指定された戻りおよび引数のレイアウトを使用して関数記述子を作成します。static FunctionDescriptorFunctionDescriptor.ofVoid(MemoryLayout... argLayouts) 指定された引数レイアウトを持つ関数記述子を作成し、戻りレイアウトは作成しません。型FunctionDescriptorのパラメータを持つjava.lang.foreignのメソッド修飾子と型メソッド説明Linker.downcallHandle(FunctionDescriptor function, Linker.Option... options) Restricted.指定されたシグネチャで外部ファンクションをコールするために使用されるメソッド・ハンドルを作成します。Linker.downcallHandle(MemorySegment address, FunctionDescriptor function, Linker.Option... options) Restricted.指定されたシグネチャおよびアドレスを持つ外部ファンクションをコールするために使用されるメソッド・ハンドルを作成します。Linker.upcallStub(MethodHandle target, FunctionDescriptor function, Arena arena, Linker.Option... options) Restricted.指定されたアリーナに関連付けられた関数ポインタとして、ほかの外部関数に渡すことができるアップコール・スタブを作成します。