Uses of Interface
java.lang.foreign.AddressLayout
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of AddressLayout in java.lang.foreign
Modifier and TypeFieldDescriptionstatic final AddressLayout
ValueLayout.ADDRESS
An address layout constant whose size is the same as that of a machine address (size_t
), byte alignment set tosizeof(size_t)
, byte order set toByteOrder.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 toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptionAddressLayout.withByteAlignment
(long byteAlignment) Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).Returns a memory layout with the same characteristics as this layout, but with the given name.Returns a value layout with the same characteristics as this layout, but with the given byte order.AddressLayout.withoutName()
Returns a memory layout with the same characteristics as this layout, but with no name.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.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.Modifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocateFrom
(AddressLayout layout, MemorySegment value) Returns a new memory segment initialized with the address of the provided memory segment.MemorySegment.get
(AddressLayout layout, long offset) Reads an address from this segment at the given offset, with the given layout.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.