Interface LocalVariableTableAttribute
- All Superinterfaces:
AttributePREVIEW<LocalVariableTableAttributePREVIEW>,ClassFileElementPREVIEW
public sealed interface LocalVariableTableAttribute
extends AttributePREVIEW<LocalVariableTableAttributePREVIEW>
LocalVariableTableAttribute is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the
LocalVariableTable attribute (JVMS 4.7.13), which can appear
on a Code attribute, and records debug information about local
variables.
Delivered as a LocalVariablePREVIEW when traversing the
elements of a CodeModelPREVIEW, according to the setting of the
ClassFile.DebugElementsOptionPREVIEW option.
The attribute permits multiple instances in a given location.
- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionReturns debug information for the local variables in this method.of(List<LocalVariableInfoPREVIEW> locals) Returns aLocalVariableTableattribute.Methods declared in interface java.lang.classfile.AttributePREVIEW
attributeMapper, attributeName
-
Method Details
-
localVariables
List<LocalVariableInfoPREVIEW> localVariables()Returns debug information for the local variables in this method.- Returns:
- debug information for the local variables in this method
-
of
Returns aLocalVariableTableattribute.- Parameters:
locals- the local variable descriptions- Returns:
- a
LocalVariableTableattribute
-
LocalVariableTableAttributewhen preview features are enabled.