public class LocalVariableTable extends Attribute implements Iterable<LocalVariable>
Code
,
LocalVariable
constant_pool, EMPTY_ARRAY, length, name_index, tag
Constructor and Description |
---|
LocalVariableTable(int nameIndex,
int length,
LocalVariable[] localVariableTable,
ConstantPool constantPool) |
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 implicitly defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool constantPool) |
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() |
Iterator<LocalVariable> |
iterator() |
void |
setLocalVariableTable(LocalVariable[] localVariableTable) |
String |
toString() |
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public LocalVariableTable(int nameIndex, int length, LocalVariable[] localVariableTable, ConstantPool constantPool)
nameIndex
- Index in constant pool to 'LocalVariableTable'length
- Content length in byteslocalVariableTable
- Table of local variablesconstantPool
- Array of constantspublic LocalVariableTable(LocalVariableTable c)
c
- Source to copy.public void accept(Visitor v)
public Attribute copy(ConstantPool constantPool)
public final void dump(DataOutputStream file) throws IOException
dump
in class Attribute
file
- Output file streamIOException
- if an I/O error occurs.@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 LocalVariable[] getLocalVariableTable()
public final int getTableLength()
public Iterator<LocalVariable> iterator()
iterator
in interface Iterable<LocalVariable>
public final void setLocalVariableTable(LocalVariable[] localVariableTable)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.