Uses of Interface java.lang.foreign.AddressLayout (Java SE 23 & JDK 23)
Description: use: module: java.base, package: java.lang.foreign, interface: AddressLayout

# Uses of Interface
java.lang.foreign.AddressLayout

Packages that use AddressLayout
Package
Description
java.lang.foreign
Provides low-level access to memory and functions outside the Java runtime.

- ## Uses of AddressLayout in java.lang.foreign

  Fields in java.lang.foreign declared as AddressLayout
  Modifier and Type
  Field
  Description
  `static final AddressLayout`
  ValueLayout.`ADDRESS`
  An address layout constant whose size is the same as that of a machine address (`size_t`), byte alignment set to `sizeof(size_t)`, byte order set to `ByteOrder.nativeOrder()`.
  `static final AddressLayout`
  ValueLayout.`ADDRESS_UNALIGNED`
  An unaligned address layout constant whose size is the same as that of a machine address (`size_t`), and byte order set to `ByteOrder.nativeOrder()`.
  Methods in java.lang.foreign that return AddressLayout
  Modifier and Type
  Method
  Description
  `AddressLayout`
  AddressLayout.`withByteAlignment(long byteAlignment)`
  Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
  `AddressLayout`
  AddressLayout.`withName(String name)`
  Returns a memory layout with the same characteristics as this layout, but with the given name.
  `AddressLayout`
  AddressLayout.`withOrder(ByteOrder order)`
  Returns a value layout with the same characteristics as this layout, but with the given byte order.
  `AddressLayout`
  AddressLayout.`withoutName()`
  Returns a memory layout with the same characteristics as this layout, but with no name.
  `AddressLayout`
  AddressLayout.`withoutTargetLayout()`
  Returns an address layout with the same carrier, alignment constraint, name and order as this address layout, but with no target layout.
  `AddressLayout`
  AddressLayout.`withTargetLayout(MemoryLayout layout)`
  Restricted.
  Returns an address layout with the same carrier, alignment constraint, name and order as this address layout, but associated with the specified target layout.
  Methods in java.lang.foreign with parameters of type AddressLayout
  Modifier and Type
  Method
  Description
  `default MemorySegment`
  SegmentAllocator.`allocateFrom(AddressLayout layout, MemorySegment value)`
  Returns a new memory segment initialized with the address of the provided memory segment.
  `MemorySegment`
  MemorySegment.`get(AddressLayout layout, long offset)`
  Reads an address from this segment at the given offset, with the given layout.
  `MemorySegment`
  MemorySegment.`getAtIndex(AddressLayout layout, long index)`
  Reads an address from this segment at the given at the given index, scaled by the given layout size.
  `void`
  MemorySegment.`set(AddressLayout layout, long offset, MemorySegment value)`
  Writes an address into this segment at the given offset, with the given layout.
  `void`
  MemorySegment.`setAtIndex(AddressLayout layout, long index, MemorySegment value)`
  Writes an address into this segment at the given index, scaled by the given layout size.