< prev index next > src/java.base/share/classes/java/lang/foreign/FunctionDescriptor.java
Print this page
import java.util.Objects;
import java.util.Optional;
import java.util.List;
import jdk.internal.foreign.FunctionDescriptorImpl;
- import jdk.internal.javac.PreviewFeature;
/**
* A function descriptor models the signature of a foreign function. A function descriptor is made up of zero or more
* argument layouts, and zero or one return layout. A function descriptor is used to create
* {@linkplain Linker#downcallHandle(MemorySegment, FunctionDescriptor, Linker.Option...) downcall method handles} and
*
* @implSpec
* Implementing classes are immutable, thread-safe and <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>.
*
* @see MemoryLayout
! * @since 19
*/
- @PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
public sealed interface FunctionDescriptor permits FunctionDescriptorImpl {
/**
* {@return the return layout (if any) of this function descriptor}
*/
*
* @implSpec
* Implementing classes are immutable, thread-safe and <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>.
*
* @see MemoryLayout
! * @since 22
*/
public sealed interface FunctionDescriptor permits FunctionDescriptorImpl {
/**
* {@return the return layout (if any) of this function descriptor}
*/
< prev index next >