Uses of Class
jdk.incubator.foreign.FunctionDescriptor
Packages that use FunctionDescriptor
Package
Description
Classes to support low-level and efficient foreign memory/function access, directly from Java.
-
Uses of FunctionDescriptor in jdk.incubator.foreign
Methods in jdk.incubator.foreign that return FunctionDescriptorModifier and TypeMethodDescriptionstatic FunctionDescriptorFunctionDescriptor.of(MemoryLayout resLayout, MemoryLayout... argLayouts) Create a function descriptor with given return and argument layouts.static FunctionDescriptorFunctionDescriptor.ofVoid(MemoryLayout... argLayouts) Create a function descriptor with given argument layouts and no return layout.FunctionDescriptor.withAppendedArgumentLayouts(MemoryLayout... addedLayouts) Create a new function descriptor with the given argument layouts appended to the argument layout array of this function descriptor.FunctionDescriptor.withAttribute(String name, Constable value) Returns a new function descriptor which features the same attributes as this descriptor, plus the newly specified attribute.FunctionDescriptor.withReturnLayout(MemoryLayout newReturn) Create a new function descriptor with the given memory layout as the new return layout.FunctionDescriptor.withVoidReturnLayout()Create a new function descriptor with the return layout dropped.Methods in jdk.incubator.foreign that return types with arguments of type FunctionDescriptorMethods in jdk.incubator.foreign with parameters of type FunctionDescriptorModifier and TypeMethodDescriptionCLinker.downcallHandle(MethodType type, 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 an address.CLinker.downcallHandle(Addressable symbol, MethodType type, 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 given address.CLinker.downcallHandle(Addressable symbol, SegmentAllocator allocator, MethodType type, FunctionDescriptor function) Obtain 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 given address.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.