Uses of Class
jdk.incubator.foreign.FunctionDescriptor
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of FunctionDescriptor in jdk.incubator.foreign
Modifier and TypeMethodDescriptionFunctionDescriptor.appendArgumentLayouts
(MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts appended to the argument layout array of this function descriptor.FunctionDescriptor.asVariadic
(MemoryLayout... variadicLayouts) Obtain a specialized variadic function descriptor, by appending given variadic layouts to this function descriptor argument layouts.FunctionDescriptor.changeReturnLayout
(MemoryLayout newReturn) Create a new function descriptor with the given memory layout as the new return layout.FunctionDescriptor.dropReturnLayout()
Create a new function descriptor with the return layout dropped.FunctionDescriptor.insertArgumentLayouts
(int index, MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts inserted at the given index, into the argument layout array of this function descriptor.static FunctionDescriptor
FunctionDescriptor.of
(MemoryLayout resLayout, MemoryLayout... argLayouts) Create a function descriptor with given return and argument layouts.static FunctionDescriptor
FunctionDescriptor.ofVoid
(MemoryLayout... argLayouts) Create a function descriptor with given argument layouts and no return layout.Modifier and TypeMethodDescriptionCLinker.downcallHandle
(FunctionDescriptor function) Obtains a foreign method handle, with the given type and featuring the given function descriptor, which can be used to call a target foreign function at the address in a dynamically provided native symbol.default MethodHandle
CLinker.downcallHandle
(NativeSymbol symbol, FunctionDescriptor function) Obtains a foreign method handle, with the given type and featuring the given function descriptor, which can be used to call a target foreign function at the address in the given native symbol.static MethodType
CLinker.downcallType
(FunctionDescriptor functionDescriptor) Obtains the downcall method handle type associated with a given function descriptor.CLinker.upcallStub
(MethodHandle target, FunctionDescriptor function, ResourceScope scope) Allocates a native stub with given scope which can be passed to other foreign functions (as a function pointer); calling such a function pointer from native code will result in the execution of the provided method handle.static MethodType
CLinker.upcallType
(FunctionDescriptor functionDescriptor) Obtains the method handle type associated with an upcall stub with given function descriptor.