# Uses of Interface
java.lang.foreign.UnionLayout

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

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

  Methods in java.lang.foreign that return UnionLayoutPREVIEW
  Modifier and Type
  Method
  Description
  `static UnionLayoutPREVIEW`
  MemoryLayout.`unionLayout(MemoryLayoutPREVIEW... elements)`
  Creates a union layout with the given member layouts.
  `UnionLayoutPREVIEW`
  UnionLayout.`withBitAlignment(long bitAlignment)`
  Returns a memory layout of the same type with the same size and name as this layout, but with the specified alignment constraint (in bits).
  `UnionLayoutPREVIEW`
  UnionLayout.`withName(String name)`
  Returns a memory layout of the same type with the same size and alignment constraint as this layout, but with the specified name.