Top Description Methods
java.lang.classfile.attribute

public sealed Interface LocalVariableTypeTableAttribute

extends Attribute<LocalVariableTypeTableAttribute>
Known Direct Implementers
jdk.internal.classfile.impl.BoundAttribute.BoundLocalVariableTypeTableAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundLocalVariableTypeTableAttribute
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.classfile.Attribute, jdk.internal.classfile.impl.BoundAttribute, .UnboundAttribute, java.util.List, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

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 java.lang.classfile.instruction.LocalVariable when traversing the elements of a java.lang.classfile.CodeModel, according to the setting of the java.lang.classfile.ClassFile.LineNumbersOption 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 TypeMethod and Description
public List<LocalVariableTypeInfo>

Returns:

debug information for the local variables in this method
localVariableTypes
()

Returns debug information for the local variables in this method.

public static LocalVariableTypeTableAttribute

Returns:

a LocalVariableTypeTable attribute
of
(List<LocalVariableTypeInfo>
the local variable descriptions
locals
)

Returns a LocalVariableTypeTable attribute.

Inherited from java.lang.classfile.Attribute:
attributeMapperattributeName

Method Detail

localVariableTypesback to summary
public List<LocalVariableTypeInfo> localVariableTypes()

Returns debug information for the local variables in this method.

Returns:List<LocalVariableTypeInfo>

debug information for the local variables in this method

ofback to summary
public static LocalVariableTypeTableAttribute of(List<LocalVariableTypeInfo> locals)

Returns a LocalVariableTypeTable attribute.

Parameters
locals:List<LocalVariableTypeInfo>

the local variable descriptions

Returns:LocalVariableTypeTableAttribute

a LocalVariableTypeTable attribute