Top Description Methods
java.lang.classfile.attribute

public sealed Interface LocalVariableInfo

Known Direct Implementers
jdk.internal.classfile.impl.BoundLocalVariable, jdk.internal.classfile.impl.UnboundAttribute.UnboundLocalVariableInfo
Annotations
@PreviewFeature
feature:CLASSFILE_API
Imports
java.lang.constant.ClassDesc, java.lang.classfile.constantpool.Utf8Entry, jdk.internal.classfile.impl.BoundLocalVariable, .UnboundAttribute, jdk.internal.javac.PreviewFeature

Preview

Second Preview of ClassFile API (JEP 466).

Programs can only use LocalVariableInfo when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

Models a single local variable in the LocalVariableTableAttribute.
Since
22

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the length of the region of the code array in which this variable is in scope.
length
()

Returns the length of the region of the code array in which this variable is in scope.

public Utf8Entry

Returns:

the name of the local variable
name
()

Returns the name of the local variable.

public int

Returns:

the index into the local variable array of the current frame which holds this local variable
slot
()

Returns the index into the local variable array of the current frame which holds this local variable.

public int

Returns:

the index into the code array (inclusive) at which the scope of this variable begins
startPc
()

Returns the index into the code array (inclusive) at which the scope of this variable begins.

public Utf8Entry

Returns:

the field descriptor of the local variable
type
()

Returns the field descriptor of the local variable.

public default ClassDesc

Returns:

the field descriptor of the local variable
typeSymbol
()

Returns the field descriptor of the local variable.

Method Detail

lengthback to summary
public int length()

Returns the length of the region of the code array in which this variable is in scope.

Returns:int

the length of the region of the code array in which this variable is in scope.

nameback to summary
public Utf8Entry name()

Returns the name of the local variable.

Returns:Utf8Entry

the name of the local variable

slotback to summary
public int slot()

Returns the index into the local variable array of the current frame which holds this local variable.

Returns:int

the index into the local variable array of the current frame which holds this local variable

startPcback to summary
public int startPc()

Returns the index into the code array (inclusive) at which the scope of this variable begins.

Returns:int

the index into the code array (inclusive) at which the scope of this variable begins

typeback to summary
public Utf8Entry type()

Returns the field descriptor of the local variable.

Returns:Utf8Entry

the field descriptor of the local variable

typeSymbolback to summary
public default ClassDesc typeSymbol()

Returns the field descriptor of the local variable.

Returns:ClassDesc

the field descriptor of the local variable