Uses of Interface jdk.incubator.foreign.Addressable (Java SE 17 & JDK 17)
Description: use: module: jdk.incubator.foreign, package: jdk.incubator.foreign, interface: Addressable

# Uses of Interface
jdk.incubator.foreign.Addressable

Packages that use Addressable
Package
Description
jdk.incubator.foreign
Classes to support low-level and efficient foreign memory/function access, directly from Java.

- ## Uses of Addressable in jdk.incubator.foreign

  Subinterfaces of Addressable in jdk.incubator.foreign
  Modifier and Type
  Interface
  Description
  `static interface`
  `CLinker.VaList`
  An interface that models a C `va_list`.
  `interface`
  `MemoryAddress`
  A memory address models a reference into a memory location.
  `interface`
  `MemorySegment`
  A memory segment models a contiguous region of memory.
  Methods in jdk.incubator.foreign with parameters of type Addressable
  Modifier and Type
  Method
  Description
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, Addressable value)`
  Allocate a block of memory with given layout and initialize it with given address value (expressed as an `Addressable` instance).
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, Addressable[] array)`
  Allocate a block of memory with given layout and initialize it with given address array.
  `MethodHandle`
  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.
  `MethodHandle`
  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.
  `static void`
  MemoryAccess.`setAddress(MemorySegment segment, Addressable value)`
  Writes a memory address at given segment, with byte order set to `ByteOrder.nativeOrder()`.
  `static void`
  MemoryAccess.`setAddressAtIndex(MemorySegment segment, long index, Addressable value)`
  Writes a memory address at given segment and element index, with byte order set to `ByteOrder.nativeOrder()`.
  `static void`
  MemoryAccess.`setAddressAtOffset(MemorySegment segment, long offset, Addressable value)`
  Writes a memory address at given segment and offset, with byte order set to `ByteOrder.nativeOrder()`.
  `CLinker.VaList.Builder`
  CLinker.VaList.Builder.`vargFromAddress(ValueLayout layout, Addressable value)`
  Adds a native value represented as a `MemoryAddress` to the C `va_list` being constructed.