APIdia Launch Partner
Top Description Methods
java.lang.classfile.attribute

public sealed Interface LocalVariableInfo

permits UnboundLocalVariableInfo, BoundLocalVariable
Known Direct Implementers
jdk.internal.classfile.impl.BoundLocalVariable, jdk.internal.classfile.impl.UnboundAttribute.UnboundLocalVariableInfo
Imports
java.lang.classfile.constantpool.Utf8Entry, java.lang.classfile.instruction.LocalVariable, java.lang.constant.ClassDesc, jdk.internal.classfile.impl.BoundLocalVariable, .UnboundAttribute, .Util

Models a single local variable in the LocalVariableTableAttribute.
Since
24
Java Virtual Machine Specification
4.7.13 The LocalVaribleTable Attribute
See Also
LocalVariableTableAttribute#localVariables(), LocalVariable

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 string of the local variable
type
()

Returns the field descriptor string 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 string of the local variable.

Returns:Utf8Entry

the field descriptor string 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