StackMapTableAttribute (Java SE 23 & JDK 23)
Description: declaration: module: java.base, package: java.lang.classfile.attribute, interface: StackMapTableAttribute
Keywords: java.lang.classfile.attribute.StackMapTableAttribute interface

# Interface StackMapTableAttribute

All Superinterfaces:
  `AttributePREVIEW<StackMapTableAttributePREVIEW>`, `ClassFileElementPREVIEW`, `CodeElementPREVIEW`, `WritableElementPREVIEW<StackMapTableAttributePREVIEW>`

public sealed interface StackMapTableAttribute extends AttributePREVIEW<StackMapTableAttributePREVIEW>, CodeElementPREVIEW
`StackMapTableAttribute` is a preview API of the Java platform.
Programs can only use `StackMapTableAttribute` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the `StackMapTable` attribute 4.7.4, which can appear on a `Code` attribute.

The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.

The attribute was introduced in the Java SE Platform version 6.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<StackMapFrameInfoPREVIEW>`
  `entries()`
  Returns the stack map frames.
  `static StackMapTableAttributePREVIEW`
  `of(List<StackMapFrameInfoPREVIEW> entries)`
  Returns a stack map table attribute.

  ### Methods declared in interface java.lang.classfile.AttributePREVIEW

  `attributeMapper, attributeName`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### entries

    List<StackMapFrameInfoPREVIEW> entries()
    Returns the stack map frames.
    Returns:
      the stack map frames

  - ### of

    static StackMapTableAttributePREVIEW of(List<StackMapFrameInfoPREVIEW> entries)
    Returns a stack map table attribute.
    Parameters:
      `entries` - the stack map frames
    Returns:
      a stack map table attribute