public class LocalVariableTable extends Attribute
Code
,
LocalVariable
,
Serialized Formconstant_pool, length, name_index, tag
Constructor and Description |
---|
LocalVariableTable(int name_index,
int length,
LocalVariable[] local_variable_table,
ConstantPool constant_pool) |
LocalVariableTable(LocalVariableTable c)
Initialize from another object.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool _constant_pool) |
void |
dump(DataOutputStream file)
Dump local variable table attribute to file stream in binary format.
|
LocalVariable |
getLocalVariable(int index)
Deprecated.
since 5.2 because multiple variables can share the
same slot, use getLocalVariable(int index, int pc) instead.
|
LocalVariable |
getLocalVariable(int index,
int pc) |
LocalVariable[] |
getLocalVariableTable() |
int |
getTableLength() |
void |
setLocalVariableTable(LocalVariable[] local_variable_table) |
String |
toString() |
addAttributeReader, clone, getConstantPool, getLength, getName, getNameIndex, getTag, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
public LocalVariableTable(LocalVariableTable c)
public LocalVariableTable(int name_index, int length, LocalVariable[] local_variable_table, ConstantPool constant_pool)
name_index
- Index in constant pool to `LocalVariableTable'length
- Content length in byteslocal_variable_table
- Table of local variablesconstant_pool
- Array of constantspublic void accept(Visitor v)
public final void dump(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file streamIOException
public final LocalVariable[] getLocalVariableTable()
@Deprecated public final LocalVariable getLocalVariable(int index)
index
- the variable slotpublic final LocalVariable getLocalVariable(int index, int pc)
index
- the variable slotpc
- the current pc that this variable is alivepublic final void setLocalVariableTable(LocalVariable[] local_variable_table)
public final String toString()
public Attribute copy(ConstantPool _constant_pool)
public final int getTableLength()