|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.RawClass.Attribute
harpoon.IR.RawClass.AttributeLocalVariableTable
public class AttributeLocalVariableTable
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.
This object represents a table mapping local variable indexes to symbolic names. This attribute is optional; typically it is not included unless debugging flags are given to the compiler.
AttributeCode
,
Attribute
Field Summary | |
---|---|
static String |
ATTRIBUTE_NAME
The string naming this Attribute type. |
LocalVariableTable[] |
local_variable_table
Each entry in the local_variable_table array
indicates a range of code offsets within which a
local variable has a value. |
Fields inherited from class harpoon.IR.RawClass.Attribute |
---|
attribute_name_index, parent |
Constructor Summary | |
---|---|
AttributeLocalVariableTable(ClassFile parent,
int attribute_name_index,
LocalVariableTable[] local_variable_table)
Constructor. |
Method Summary | |
---|---|
long |
attribute_length()
The value of the attribute_length item indicates
the length of the attribute, excluding the initial six bytes. |
int |
local_variable_table_length()
|
String |
localName(int pc,
int index)
Get the (debugging) name of a local variable. |
void |
print(PrintWriter pw,
int indent)
Pretty-print the contents of this attribute. |
void |
write(ClassDataOutputStream out)
Write to bytecode stream. |
Methods inherited from class harpoon.IR.RawClass.Attribute |
---|
attribute_name_index, attribute_name, read, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_NAME
Attribute
type.
public LocalVariableTable[] local_variable_table
local_variable_table
array
indicates a range of code
offsets within which a
local variable has a value. It also indicates the index into
the local variables of the current frame at which that local
variable can be found.
Constructor Detail |
---|
public AttributeLocalVariableTable(ClassFile parent, int attribute_name_index, LocalVariableTable[] local_variable_table)
Method Detail |
---|
public long attribute_length()
Attribute
attribute_length
item indicates
the length of the attribute, excluding the initial six bytes.
attribute_length
in class Attribute
public int local_variable_table_length()
public void write(ClassDataOutputStream out) throws IOException
write
in class Attribute
IOException
public String localName(int pc, int index)
pc
- the pc at which the inquiry is being made.index
- the index of the local variable to query.
public void print(PrintWriter pw, int indent)
print
in class Attribute
indent
- the indentation level to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |