# Uses of Interface
java.lang.foreign.UnionLayout

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

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

  Methods in java.lang.foreign that return UnionLayout
  Modifier and Type
  Method
  Description
  `static UnionLayout`
  MemoryLayout.`unionLayout(MemoryLayout... elements)`
  Creates a union layout with the given member layouts.
  `UnionLayout`
  UnionLayout.`withByteAlignment(long byteAlignment)`
  Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
  `UnionLayout`
  UnionLayout.`withName(String name)`
  Returns a memory layout with the same characteristics as this layout, but with the given name.
  `UnionLayout`
  UnionLayout.`withoutName()`
  Returns a memory layout with the same characteristics as this layout, but with no name.