Uses of Class jdk.incubator.foreign.ValueLayout (Java SE 17 & JDK 17)
Description: use: module: jdk.incubator.foreign, package: jdk.incubator.foreign, class: ValueLayout

# Uses of Class
jdk.incubator.foreign.ValueLayout

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

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

  Fields in jdk.incubator.foreign declared as ValueLayout
  Modifier and Type
  Field
  Description
  `static final ValueLayout`
  MemoryLayouts.`ADDRESS`
  A value layout constant whose size is the same as that of a machine address (e.g.
  `static final ValueLayout`
  MemoryLayouts.`BITS_16_BE`
  A value layout constant with size of two bytes, and byte order set to `ByteOrder.BIG_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_16_LE`
  A value layout constant with size of two bytes, and byte order set to `ByteOrder.LITTLE_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_32_BE`
  A value layout constant with size of four bytes, and byte order set to `ByteOrder.BIG_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_32_LE`
  A value layout constant with size of four bytes, and byte order set to `ByteOrder.LITTLE_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_64_BE`
  A value layout constant with size of eight bytes, and byte order set to `ByteOrder.BIG_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_64_LE`
  A value layout constant with size of eight bytes, and byte order set to `ByteOrder.LITTLE_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_8_BE`
  A value layout constant with size of one byte, and byte order set to `ByteOrder.BIG_ENDIAN`.
  `static final ValueLayout`
  MemoryLayouts.`BITS_8_LE`
  A value layout constant with size of one byte, and byte order set to `ByteOrder.LITTLE_ENDIAN`.
  `static final ValueLayout`
  CLinker.`C_CHAR`
  The layout for the `char` C type
  `static final ValueLayout`
  CLinker.`C_DOUBLE`
  The layout for the `double` C type
  `static final ValueLayout`
  CLinker.`C_FLOAT`
  The layout for the `float` C type
  `static final ValueLayout`
  CLinker.`C_INT`
  The layout for the `int` C type
  `static final ValueLayout`
  CLinker.`C_LONG`
  The layout for the `long` C type
  `static final ValueLayout`
  CLinker.`C_LONG_LONG`
  The layout for the `long long` C type.
  `static final ValueLayout`
  CLinker.`C_POINTER`
  The `T*` native type.
  `static final ValueLayout`
  CLinker.`C_SHORT`
  The layout for the `short` C type
  `static final ValueLayout`
  MemoryLayouts.`JAVA_BYTE`
  A value layout constant whose size is the same as that of a Java `byte`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_CHAR`
  A value layout constant whose size is the same as that of a Java `char`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_DOUBLE`
  A value layout constant whose size is the same as that of a Java `double`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_FLOAT`
  A value layout constant whose size is the same as that of a Java `float`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_INT`
  A value layout constant whose size is the same as that of a Java `int`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_LONG`
  A value layout constant whose size is the same as that of a Java `long`, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout`
  MemoryLayouts.`JAVA_SHORT`
  A value layout constant whose size is the same as that of a Java `short`, and byte order set to `ByteOrder.nativeOrder()`.
  Methods in jdk.incubator.foreign that return ValueLayout
  Modifier and Type
  Method
  Description
  `static ValueLayout`
  MemoryLayout.`valueLayout(long size, ByteOrder order)`
  Create a value layout of given byte order and size.
  `ValueLayout`
  ValueLayout.`withAttribute(String name, Constable value)`
  Returns a new memory layout which features the same attributes as this layout, plus the newly specified attribute.
  `ValueLayout`
  ValueLayout.`withBitAlignment(long alignmentBits)`
  Creates a new layout which features the desired alignment constraint.
  `ValueLayout`
  ValueLayout.`withName(String name)`
  Creates a new layout which features the desired layout name.
  `ValueLayout`
  ValueLayout.`withOrder(ByteOrder order)`
  Returns a new value layout with given byte order.
  Methods in jdk.incubator.foreign that return types with arguments of type ValueLayout
  Modifier and Type
  Method
  Description
  `Optional<DynamicConstantDesc<ValueLayout>>`
  ValueLayout.`describeConstable()`
  Methods in jdk.incubator.foreign with parameters of type ValueLayout
  Modifier and Type
  Method
  Description
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, byte value)`
  Allocate a block of memory with given layout and initialize it with given byte value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, char value)`
  Allocate a block of memory with given layout and initialize it with given char value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, double value)`
  Allocate a block of memory with given layout and initialize it with given double value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, float value)`
  Allocate a block of memory with given layout and initialize it with given float value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, int value)`
  Allocate a block of memory with given layout and initialize it with given int value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, long value)`
  Allocate a block of memory with given layout and initialize it with given long value.
  `default MemorySegment`
  SegmentAllocator.`allocate(ValueLayout layout, short value)`
  Allocate a block of memory with given layout and initialize it with given short value.
  `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, byte[] array)`
  Allocate a block of memory with given layout and initialize it with given byte array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, char[] array)`
  Allocate a block of memory with given layout and initialize it with given char array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, double[] array)`
  Allocate a block of memory with given layout and initialize it with given double array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, float[] array)`
  Allocate a block of memory with given layout and initialize it with given float array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, int[] array)`
  Allocate a block of memory with given layout and initialize it with given int array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, long[] array)`
  Allocate a block of memory with given layout and initialize it with given long array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, short[] array)`
  Allocate a block of memory with given layout and initialize it with given short array.
  `default MemorySegment`
  SegmentAllocator.`allocateArray(ValueLayout elementLayout, Addressable[] array)`
  Allocate a block of memory with given layout and initialize it with given address array.
  `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.
  `CLinker.VaList.Builder`
  CLinker.VaList.Builder.`vargFromDouble(ValueLayout layout, double value)`
  Adds a native value represented as a `double` to the C `va_list` being constructed.
  `CLinker.VaList.Builder`
  CLinker.VaList.Builder.`vargFromInt(ValueLayout layout, int value)`
  Adds a native value represented as an `int` to the C `va_list` being constructed.
  `CLinker.VaList.Builder`
  CLinker.VaList.Builder.`vargFromLong(ValueLayout layout, long value)`
  Adds a native value represented as a `long` to the C `va_list` being constructed.