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

# Uses of Interface
jdk.incubator.foreign.MemoryLayout

Packages that use MemoryLayout
Package | Description
--- | ---
jdk.incubator.foreign | Classes to support low-level, safe and efficient memory access.

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

  Classes in jdk.incubator.foreign that implement MemoryLayout
  Modifier and Type | Class | Description
  --- | --- | ---
  `class` | `GroupLayout` | A group layout is used to combine together multiple member layouts.
  `class` | `SequenceLayout` | A sequence layout.
  `class` | `ValueLayout` | A value layout.

  Fields in jdk.incubator.foreign declared as MemoryLayout
  Modifier and Type | Field | Description
  --- | --- | ---
  `static MemoryLayout` | MemoryLayouts.`PAD_16` | A padding layout constant with size of two bytes.
  `static MemoryLayout` | MemoryLayouts.`PAD_32` | A padding layout constant with size of four bytes.
  `static MemoryLayout` | MemoryLayouts.`PAD_64` | A padding layout constant with size of eight bytes.
  `static MemoryLayout` | MemoryLayouts.`PAD_8` | A padding layout constant with size of one byte.

  Methods in jdk.incubator.foreign that return MemoryLayout
  Modifier and Type | Method | Description
  --- | --- | ---
  `MemoryLayout` | SequenceLayout.`elementLayout()` | Returns the element layout associated with this sequence layout.
  `default MemoryLayout` | MemoryLayout.`map​(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements)` | Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.
  `static MemoryLayout` | MemoryLayout.`ofPaddingBits​(long size)` | Create a new padding layout with given size.
  `default MemoryLayout` | MemoryLayout.`select​(MemoryLayout.PathElement... elements)` | Selects the layout from a path rooted in this layout.
  `MemoryLayout` | MemoryLayout.`withBitAlignment​(long bitAlignment)` | Creates a new layout which features the desired alignment constraint.
  `MemoryLayout` | MemoryLayout.`withName​(String name)` | Creates a new layout which features the desired layout name.

  Methods in jdk.incubator.foreign that return types with arguments of type MemoryLayout
  Modifier and Type | Method | Description
  --- | --- | ---
  `Optional<? extends DynamicConstantDesc<? extends MemoryLayout>>` | MemoryLayout.`describeConstable()` | Returns an `Optional` containing the nominal descriptor for this layout, if one can be constructed, or an empty `Optional` if one cannot be constructed.
  `List<MemoryLayout>` | GroupLayout.`memberLayouts()` | Returns the member layouts associated with this group.

  Methods in jdk.incubator.foreign with parameters of type MemoryLayout
  Modifier and Type | Method | Description
  --- | --- | ---
  `static MemorySegment` | MemorySegment.`allocateNative​(MemoryLayout layout)` | Creates a new native memory segment that models a newly allocated block of off-heap memory with given layout.
  `static SequenceLayout` | MemoryLayout.`ofSequence​(long elementCount, MemoryLayout elementLayout)` | Create a new sequence layout with given element layout and element count.
  `static SequenceLayout` | MemoryLayout.`ofSequence​(MemoryLayout elementLayout)` | Create a new sequence layout, with unbounded element count and given element layout.
  `static GroupLayout` | MemoryLayout.`ofStruct​(MemoryLayout... elements)` | Create a new struct group layout with given member layouts.
  `static GroupLayout` | MemoryLayout.`ofUnion​(MemoryLayout... elements)` | Create a new union group layout with given member layouts.

  Method parameters in jdk.incubator.foreign with type arguments of type MemoryLayout
  Modifier and Type | Method | Description
  --- | --- | ---
  `default MemoryLayout` | MemoryLayout.`map​(UnaryOperator<MemoryLayout> op, MemoryLayout.PathElement... elements)` | Creates a transformed copy of this layout where a selected layout, from a path rooted in this layout, is replaced with the result of applying the given operation.