jef.dna.attributes
Interface LocalVariableTableAttribute

All Superinterfaces:
Attribute, BytesCountable, java.lang.Cloneable
All Known Implementing Classes:
LocalVariableTableAttribute

public interface LocalVariableTableAttribute
extends Attribute

Class representing a Local Variable Table Attribute. The LocalVariableTable attribute is an optional variable-length attribute of a Code attribute. It may be used by debuggers to determine the value of a given local variable during the execution of a method. If LocalVariableTable attributes are present in the attributes table of a given Code attribute, then they may appear in any order. There may be no more than one LocalVariableTable attribute per local variable in the Code attribute.

Author:
Francesco Russo frusso@cs.unibo.it

Method Summary
 CodeAttribute getAttributeContainer()
          Get the reference to the CodeAttribute containing the current LocalVariableTableAttribute.
 java.util.List<LocalVariableTableEntry> getLocalVariableTable()
          Each entry in the local_variable_table array indicates a range of code array offsets within which a local variable has a value.
 int getLocalVariableTableLength()
          The value of the local_variable_table_length item indicates the number of entries in the local_variable_table array.
 void setAttributeContainer(CodeAttribute attribute)
          Set the reference to the CodeAttribute containing the current LocalVariableTableAttribute.
 
Methods inherited from interface jef.dna.attributes.Attribute
clone, fromStream, getDna, getLength, getNameIndex, setDna, setNameIndex, toStream, updateRefs, validate
 
Methods inherited from interface jef.dna.util.BytesCountable
getBytesCount
 

Method Detail

getLocalVariableTableLength

int getLocalVariableTableLength()
The value of the local_variable_table_length item indicates the number of entries in the local_variable_table array.

Returns:
int The dimension of the local variable table

getLocalVariableTable

java.util.List<LocalVariableTableEntry> getLocalVariableTable()
Each entry in the local_variable_table array indicates a range of code array offsets within which a local variable has a value. It also indicates the index into the local variable array of the current frame at which that local variable can be found.

Returns:
List The local variable table shaped as a List storing LocalVariableTableEntry instances

setAttributeContainer

void setAttributeContainer(CodeAttribute attribute)
Set the reference to the CodeAttribute containing the current LocalVariableTableAttribute.

Parameters:
attribute - The container

getAttributeContainer

CodeAttribute getAttributeContainer()
Get the reference to the CodeAttribute containing the current LocalVariableTableAttribute.

Returns:
CodeAttribute The container