Package Summary Overview Summary

Module java.base
Package java.lang.classfile.attributePREVIEW

# Interface LocalVariableTypeTableAttribute

All Superinterfaces:
  `AttributePREVIEW<LocalVariableTypeTableAttributePREVIEW>`, `ClassFileElementPREVIEW`, `WritableElementPREVIEW<LocalVariableTypeTableAttributePREVIEW>`

public sealed interface LocalVariableTypeTableAttribute extends AttributePREVIEW<LocalVariableTypeTableAttributePREVIEW>
`LocalVariableTypeTableAttribute` is a preview API of the Java platform.
Programs can only use `LocalVariableTypeTableAttribute` 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 `LocalVariableTypeTable` attribute 4.7.14, which can appear on a `Code` attribute, and records debug information about local variables. Delivered as a `LocalVariable`PREVIEW when traversing the elements of a `CodeModel`PREVIEW, according to the setting of the `ClassFile.LineNumbersOption`PREVIEW option.

The attribute permits multiple instances in a given location.

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

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List <LocalVariableTypeInfoPREVIEW>`
  `localVariableTypes()`
  Returns debug information for the local variables in this method.
  `static LocalVariableTypeTableAttributePREVIEW`
  `of (List<LocalVariableTypeInfoPREVIEW> locals)`
  Returns a `LocalVariableTypeTable` attribute.

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

  `attributeMapper, attributeName`

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

  `writeTo`

- ## Method Details

  - ### localVariableTypes

    List<LocalVariableTypeInfoPREVIEW> localVariableTypes()
    Returns debug information for the local variables in this method.
    Returns:
      debug information for the local variables in this method

  - ### of

    static LocalVariableTypeTableAttributePREVIEW of (List<LocalVariableTypeInfoPREVIEW> locals)
    Returns a `LocalVariableTypeTable` attribute.
    Parameters:
      `locals` - the local variable descriptions
    Returns:
      a `LocalVariableTypeTable` attribute