# Uses of Interface
java.lang.foreign.ValueLayout

Packages that use ValueLayoutPREVIEW
Package
Description
java.lang.foreign
Provides low-level access to memory and functions outside the Java runtime.
java.lang.invoke
The `java.lang.invoke` package provides low-level primitives for interacting with the Java Virtual Machine.

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

  Subinterfaces of ValueLayoutPREVIEW in java.lang.foreign
  Modifier and Type
  Interface
  Description
  `interface`
  `AddressLayoutPREVIEW`
  Preview.
  A value layout used to model the address of some region of memory.
  `static interface`
  `ValueLayout.OfBooleanPREVIEW`
  Preview.
  A value layout whose carrier is `boolean.class`.
  `static interface`
  `ValueLayout.OfBytePREVIEW`
  Preview.
  A value layout whose carrier is `byte.class`.
  `static interface`
  `ValueLayout.OfCharPREVIEW`
  Preview.
  A value layout whose carrier is `char.class`.
  `static interface`
  `ValueLayout.OfDoublePREVIEW`
  Preview.
  A value layout whose carrier is `double.class`.
  `static interface`
  `ValueLayout.OfFloatPREVIEW`
  Preview.
  A value layout whose carrier is `float.class`.
  `static interface`
  `ValueLayout.OfIntPREVIEW`
  Preview.
  A value layout whose carrier is `int.class`.
  `static interface`
  `ValueLayout.OfLongPREVIEW`
  Preview.
  A value layout whose carrier is `long.class`.
  `static interface`
  `ValueLayout.OfShortPREVIEW`
  Preview.
  A value layout whose carrier is `short.class`.
  Methods in java.lang.foreign that return ValueLayoutPREVIEW
  Modifier and Type
  Method
  Description
  `ValueLayoutPREVIEW`
  ValueLayout.`withByteAlignment(long byteAlignment)`
  Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
  `ValueLayoutPREVIEW`
  ValueLayout.`withName(String name)`
  Returns a memory layout with the same characteristics as this layout, but with the given name.
  `ValueLayoutPREVIEW`
  ValueLayout.`withOrder(ByteOrder order)`
  Returns a value layout with the same characteristics as this layout, but with the given byte order.
  `ValueLayoutPREVIEW`
  ValueLayout.`withoutName()`
  Returns a memory layout with the same characteristics as this layout, but with no name.
  Methods in java.lang.foreign with parameters of type ValueLayoutPREVIEW
  Modifier and Type
  Method
  Description
  `static void`
  MemorySegment.`copy(MemorySegmentPREVIEW srcSegment, ValueLayoutPREVIEW srcElementLayout, long srcOffset, MemorySegmentPREVIEW dstSegment, ValueLayoutPREVIEW dstElementLayout, long dstOffset, long elementCount)`
  Performs a bulk copy from source segment to destination segment.
  `static void`
  MemorySegment.`copy(MemorySegmentPREVIEW srcSegment, ValueLayoutPREVIEW srcLayout, long srcOffset, Object dstArray, int dstIndex, int elementCount)`
  Copies a number of elements from a source memory segment to a destination array.
  `static void`
  MemorySegment.`copy(Object srcArray, int srcIndex, MemorySegmentPREVIEW dstSegment, ValueLayoutPREVIEW dstLayout, long dstOffset, int elementCount)`
  Copies a number of elements from a source array to a destination memory segment.

- ## Uses of ValueLayoutPREVIEW in java.lang.invoke

  Methods in java.lang.invoke with parameters of type ValueLayoutPREVIEW
  Modifier and Type
  Method
  Description
  `static VarHandle`
  MethodHandles.`memorySegmentViewVarHandle(ValueLayoutPREVIEW layout)`
  Preview.
  Creates a var handle object, which can be used to dereference a memory segmentPREVIEW at a given byte offset, using the provided value layout.