# Preview API

Show preview API for:

- 430: String Templates (Preview)
- 442: Foreign Function & Memory API (Third Preview)
- 443: Unnamed Patterns and Variables (Preview)
- 445: Unnamed Classes and Instance Main Methods (Preview)
- 446: Scoped Values (Preview)
- 453: Structured Concurrency (Preview)

## Contents

- Interfaces
- Classes
- Enum Classes
- Exception Classes
- Fields
- Methods
- Enum Constants

- Interfaces
  Interface
  Preview Feature
  Description
  com.sun.source.tree.AnyPatternTreePREVIEW
  Unnamed Patterns and Variables
  A tree node for a binding pattern that matches a pattern with a variable of any name and a type of the match candidate; an unnamed pattern.
  com.sun.source.tree.StringTemplateTreePREVIEW
  String Templates
  A tree node for a string template expression.
  java.lang.foreign.AddressLayoutPREVIEW
  Foreign Function & Memory API
  A value layout used to model the address of some region of memory.
  java.lang.foreign.ArenaPREVIEW
  Foreign Function & Memory API
  An arena controls the lifecycle of native memory segments, providing both flexible allocation and timely deallocation.
  java.lang.foreign.FunctionDescriptorPREVIEW
  Foreign Function & Memory API
  A function descriptor models the signature of a foreign function.
  java.lang.foreign.GroupLayoutPREVIEW
  Foreign Function & Memory API
  A compound layout that is an aggregation of multiple, heterogeneous member layouts.
  java.lang.foreign.LinkerPREVIEW
  Foreign Function & Memory API
  A linker provides access to foreign functions from Java code, and access to Java code from foreign functions.
  java.lang.foreign.Linker.OptionPREVIEW
  Foreign Function & Memory API
  A linker option is used to provide additional parameters to a linkage request.
  java.lang.foreign.MemoryLayoutPREVIEW
  Foreign Function & Memory API
  A memory layout describes the contents of a memory segment.
  java.lang.foreign.MemoryLayout.PathElementPREVIEW
  Foreign Function & Memory API
  An element in a layout path.
  java.lang.foreign.MemorySegmentPREVIEW
  Foreign Function & Memory API
  A memory segment provides access to a contiguous region of memory.
  java.lang.foreign.MemorySegment.ScopePREVIEW
  Foreign Function & Memory API
  A scope models the lifetime of all the memory segments associated with it.
  java.lang.foreign.PaddingLayoutPREVIEW
  Foreign Function & Memory API
  A padding layout.
  java.lang.foreign.SegmentAllocatorPREVIEW
  Foreign Function & Memory API
  An object that may be used to allocate memory segmentsPREVIEW.
  java.lang.foreign.SequenceLayoutPREVIEW
  Foreign Function & Memory API
  A compound layout that denotes a homogeneous repetition of a given element layout.
  java.lang.foreign.StructLayoutPREVIEW
  Foreign Function & Memory API
  A group layout whose member layouts are laid out one after the other.
  java.lang.foreign.SymbolLookupPREVIEW
  Foreign Function & Memory API
  A symbol lookup retrieves the address of a symbol in one or more libraries.
  java.lang.foreign.UnionLayoutPREVIEW
  Foreign Function & Memory API
  A group layout whose member layouts are laid out at the same starting offset.
  java.lang.foreign.ValueLayoutPREVIEW
  Foreign Function & Memory API
  A layout that models values of basic data types.
  java.lang.foreign.ValueLayout.OfBooleanPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `boolean.class`.
  java.lang.foreign.ValueLayout.OfBytePREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `byte.class`.
  java.lang.foreign.ValueLayout.OfCharPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `char.class`.
  java.lang.foreign.ValueLayout.OfDoublePREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `double.class`.
  java.lang.foreign.ValueLayout.OfFloatPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `float.class`.
  java.lang.foreign.ValueLayout.OfIntPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `int.class`.
  java.lang.foreign.ValueLayout.OfLongPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `long.class`.
  java.lang.foreign.ValueLayout.OfShortPREVIEW
  Foreign Function & Memory API
  A value layout whose carrier is `short.class`.
  java.lang.StringTemplatePREVIEW
  String Templates
  `StringTemplate`PREVIEW is the run-time representation of a string template or text block template in a template expression.
  java.lang.StringTemplate.ProcessorPREVIEW
  String Templates
  This interface describes the methods provided by a generalized string template processor.
  java.lang.StringTemplate.Processor.LinkagePREVIEW
  String Templates
  Built-in policies using this additional interface have the flexibility to specialize the composition of the templated string by returning a customized `MethodHandle` from `linkage`PREVIEW.
  java.util.concurrent.StructuredTaskScope.SubtaskPREVIEW
  Structured Concurrency
  Represents a subtask forked with `StructuredTaskScope.fork(Callable)`PREVIEW.

- Classes
  Class
  Preview Feature
  Description
  java.lang.runtime.TemplateRuntimePREVIEW
  String Templates
  Manages string template bootstrap methods.
  java.lang.ScopedValuePREVIEW
  Scoped Values
  A value that may be safely and efficiently shared to methods without using method parameters.
  java.lang.ScopedValue.CarrierPREVIEW
  Scoped Values
  A mapping of scoped values, as keys, to values.
  java.util.concurrent.StructuredTaskScopePREVIEW
  Structured Concurrency
  A basic API for structured concurrency.
  java.util.concurrent.StructuredTaskScope.ShutdownOnFailurePREVIEW
  Structured Concurrency
  A `StructuredTaskScope` that captures the exception of the first subtask to failPREVIEW.
  java.util.concurrent.StructuredTaskScope.ShutdownOnSuccessPREVIEW
  Structured Concurrency
  A `StructuredTaskScope` that captures the result of the first subtask to complete successfullyPREVIEW.
  java.util.FormatProcessorPREVIEW
  String Templates
  This `StringTemplate.Processor`PREVIEW constructs a `String` result using `Formatter` specifications and values found in the `StringTemplate`PREVIEW.

- Enum Classes
  Enum Class
  Preview Feature
  Description
  java.util.concurrent.StructuredTaskScope.Subtask.StatePREVIEW
  Structured Concurrency
  Represents the state of a subtask.

- Exception Classes
  Exception Class
  Preview Feature
  Description
  java.util.concurrent.StructureViolationExceptionPREVIEW
  Structured Concurrency
  Thrown when a structure violation is detected.

- Fields
  Field
  Preview Feature
  Description
  java.lang.invoke.StringConcatFactory.MAX_INDY_CONCAT_ARG_SLOTSPREVIEW
  String Templates
  Maximum number of argument slots in String Concat call.

- Methods
  Method
  Preview Feature
  Description
  com.sun.source.tree.TreeVisitor.visitAnyPattern(AnyPatternTree, P)PREVIEW
  Unnamed Patterns and Variables
  Visits a `AnyPatternTree` node.
  com.sun.source.tree.TreeVisitor.visitStringTemplate(StringTemplateTree, P)PREVIEW
  String Templates
  Visits a StringTemplateTree node.
  com.sun.source.util.SimpleTreeVisitor.visitAnyPattern(AnyPatternTree, P)PREVIEW
  Unnamed Patterns and Variables
  Visits a `AnyPatternTree` node.
  com.sun.source.util.SimpleTreeVisitor.visitStringTemplate(StringTemplateTree, P)PREVIEW
  String Templates
  Visits a StringTemplateTree node.
  com.sun.source.util.TreeScanner.visitStringTemplate(StringTemplateTree, P)PREVIEW
  String Templates
  Visits a StringTemplateTree node.
  java.lang.Class.isUnnamedClass()PREVIEW
  Unnamed Classes and Instance Main Methods
  Returns `true` if and only if the underlying class is an unnamed class.
  java.lang.invoke.MethodHandles.collectCoordinates(VarHandle, int, MethodHandle)PREVIEW
  Foreign Function & Memory API
  Adapts a target var handle by pre-processing a sub-sequence of its coordinate values with a filter (a method handle).
  java.lang.invoke.MethodHandles.dropCoordinates(VarHandle, int, Class<?>...)PREVIEW
  Foreign Function & Memory API
  Returns a var handle which will discard some dummy coordinates before delegating to the target var handle.
  java.lang.invoke.MethodHandles.filterCoordinates(VarHandle, int, MethodHandle...)PREVIEW
  Foreign Function & Memory API
  Adapts a target var handle by pre-processing incoming coordinate values using unary filter functions.
  java.lang.invoke.MethodHandles.filterValue(VarHandle, MethodHandle, MethodHandle)PREVIEW
  Foreign Function & Memory API
  Adapts a target var handle by pre-processing incoming and outgoing values using a pair of filter functions.
  java.lang.invoke.MethodHandles.insertCoordinates(VarHandle, int, Object...)PREVIEW
  Foreign Function & Memory API
  Provides a target var handle with one or more bound coordinates in advance of the var handle's invocation.
  java.lang.invoke.MethodHandles.memorySegmentViewVarHandle(ValueLayout)PREVIEW
  Foreign Function & Memory API
  Creates a var handle object, which can be used to dereference a memory segmentPREVIEW at a given byte offset, using the provided value layout.
  java.lang.invoke.MethodHandles.permuteCoordinates(VarHandle, List<Class<?>>, int...)PREVIEW
  Foreign Function & Memory API
  Provides a var handle which adapts the coordinate values of the target var handle, by re-arranging them so that the new coordinates match the provided ones.
  java.lang.invoke.StringConcatFactory.makeConcatWithTemplate(List<String>, List<Class<?>>)PREVIEW
  String Templates
  Simplified concatenation method to facilitate `StringTemplate`PREVIEW concatenation.
  java.lang.invoke.StringConcatFactory.makeConcatWithTemplateCluster(List<String>, List<Class<?>>, int)PREVIEW
  String Templates
  This method breaks up large concatenations into separate `MethodHandles` based on the number of slots required per `MethodHandle`.
  java.lang.invoke.StringConcatFactory.makeConcatWithTemplateGetters(List<String>, List<MethodHandle>, int)PREVIEW
  String Templates
  This method creates a `MethodHandle` expecting one input, the receiver of the supplied getters.
  java.lang.Module.isNativeAccessEnabled()PREVIEW
  Foreign Function & Memory API
  Returns `true` if this module can access restricted methods.
  java.lang.ModuleLayer.Controller.enableNativeAccess(Module)PREVIEW
  Foreign Function & Memory API
  Enables native access for a module in the layer if the caller's module has native access.
  java.nio.channels.FileChannel.map(FileChannel.MapMode, long, long, Arena)PREVIEW
  Foreign Function & Memory API
  Maps a region of this channel's file into a new mapped memory segment, with the given offset, size and arena.
  javax.lang.model.element.TypeElement.isUnnamed()PREVIEW
  Unnamed Classes and Instance Main Methods
  Returns `true` if this is an unnamed class and `false` otherwise.
  javax.lang.model.element.VariableElement.isUnnamed()PREVIEW
  Unnamed Patterns and Variables
  Returns `true` if this is an unnamed variable and `false` otherwise.

- Enum Constants
  Enum Constant
  Preview Feature
  Description
  com.sun.source.tree.Tree.Kind.ANY_PATTERNPREVIEW
  Unnamed Patterns and Variables
  Used for instances of `BindingPatternTree`.
  com.sun.source.tree.Tree.Kind.TEMPLATEPREVIEW
  String Templates
  Used for instances of `StringTemplateTree`PREVIEW.