# Uses of Package
java.lang.foreign

Packages that use java.lang.foreign
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.
java.nio.channels
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
jdk.incubator.vector
Incubating Feature. Will be removed in a future release.

- Classes in java.lang.foreign used by java.lang.foreign
  Class
  Description
  Arena
  Preview.
  An arena controls the lifecycle of memory segments, providing both flexible allocation and timely deallocation.
  FunctionDescriptor
  Preview.
  A function descriptor models the signature of foreign functions.
  GroupLayout
  Preview.
  A compound layout that aggregates multiple member layouts.
  Linker
  Preview.
  A linker provides access to foreign functions from Java code, and access to Java code from foreign functions.
  Linker.Option
  Preview.
  A linker option is used to indicate additional linking requirements to the linker, besides what is described by a function descriptor.
  Linker.Option.CaptureCallState
  Preview.
  A linker option for saving portions of the execution state immediately after calling a foreign function associated with a downcall method handle, before it can be overwritten by the runtime, or read through conventional means.
  MemoryLayout
  Preview.
  A memory layout describes the contents of a memory segment.
  MemoryLayout.PathElement
  Preview.
  An element in a layout path.
  MemorySegment
  Preview.
  A memory segment provides access to a contiguous region of memory.
  PaddingLayout
  Preview.
  A padding layout.
  SegmentAllocator
  Preview.
  An object that may be used to allocate memory segmentsPREVIEW.
  SegmentScope
  Preview.
  A segment scope controls access to memory segments.
  SequenceLayout
  Preview.
  A compound layout that denotes a repetition of a given element layout.
  StructLayout
  Preview.
  A group layout whose member layouts are laid out one after the other.
  SymbolLookup
  Preview.
  A symbol lookup retrieves the address of a symbol in one or more libraries.
  UnionLayout
  Preview.
  A group layout whose member layouts are laid out at the same starting offset.
  VaList
  Preview.
  Helper class to create and manipulate variable argument lists, similar in functionality to a C `va_list`.
  VaList.Builder
  Preview.
  A builder used to construct a variable argument listPREVIEW.
  ValueLayout
  Preview.
  A layout that models values of basic data types.
  ValueLayout.OfAddress
  Preview.
  A value layout whose carrier is `MemorySegment.class`.
  ValueLayout.OfBoolean
  Preview.
  A value layout whose carrier is `boolean.class`.
  ValueLayout.OfByte
  Preview.
  A value layout whose carrier is `byte.class`.
  ValueLayout.OfChar
  Preview.
  A value layout whose carrier is `char.class`.
  ValueLayout.OfDouble
  Preview.
  A value layout whose carrier is `double.class`.
  ValueLayout.OfFloat
  Preview.
  A value layout whose carrier is `float.class`.
  ValueLayout.OfInt
  Preview.
  A value layout whose carrier is `int.class`.
  ValueLayout.OfLong
  Preview.
  A value layout whose carrier is `long.class`.
  ValueLayout.OfShort
  Preview.
  A value layout whose carrier is `short.class`.
- Classes in java.lang.foreign used by java.lang.invoke
  Class
  Description
  ValueLayout
  Preview.
  A layout that models values of basic data types.
- Classes in java.lang.foreign used by java.nio.channels
  Class
  Description
  MemorySegment
  Preview.
  A memory segment provides access to a contiguous region of memory.
  SegmentScope
  Preview.
  A segment scope controls access to memory segments.
- Classes in java.lang.foreign used by jdk.incubator.vector
  Class
  Description
  MemorySegment
  Preview.
  A memory segment provides access to a contiguous region of memory.