|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.techtrader.modules.tools.bytecode.LocalVariable
Represents a local variable in a method. TODO: Add the ability to manipulate the local variable declaration at a high level.
Constructor Summary | |
protected |
LocalVariable(LocalVariableTableAttribute owner)
Protected constructor. |
Method Summary | |
void |
acceptVisit(BCVisitor visit)
|
int |
getDescriptorIndex()
Get the index in the constant pool of the UTF entry holding the descriptor of this local. |
int |
getIndex()
Get the index into local variable table of the current frame for this variable. |
int |
getLength()
Get the number of bytes for which this local variable has a value in the code byt array. |
String |
getName()
Get the name of this local. |
int |
getNameIndex()
Get the index into the constant pool of the UTF8Entry holding the name of this variable. |
LocalVariableTableAttribute |
getOwner()
Local variables are contained in LocalVariableTableAttributds. |
int |
getStartPc()
Get the start position of the program counter at which this local variable has a value. |
Class |
getType()
Get the Class object for the type of this field. |
String |
getTypeName()
Get the name of the type of this local. |
protected void |
invalidate()
Used when the local is removed from the method, so that it can no longer affect the constant pool. |
protected void |
readData(DataInput in)
|
void |
setDescriptorIndex(int index)
Set the index in the constant pool of the UTF entry holding the descriptor of this local. |
void |
setIndex(int index)
Set the index into local variable table of the current frame for this variable. |
void |
setLength(int length)
Set the number of bytes for which this local variable has a value in the code byt array. |
void |
setName(String name)
Set the name of this local. |
void |
setNameIndex(int nameIndex)
Set the index into the constant pool of the UTF8Entry holding the name of this variable. |
void |
setStartPc(int startPc)
Set the start position of the program counter at which this local variable has a value. |
void |
setType(Class type)
Set the type of this field. |
void |
setTypeName(String name)
Set the type name for this local. |
protected void |
writeData(DataOutput out)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected LocalVariable(LocalVariableTableAttribute owner)
Method Detail |
protected void invalidate()
public LocalVariableTableAttribute getOwner()
public int getIndex()
public void setIndex(int index)
public int getStartPc()
public void setStartPc(int startPc)
public int getLength()
public void setLength(int length)
public int getNameIndex()
public void setNameIndex(int nameIndex)
public String getName()
public void setName(String name)
public int getDescriptorIndex()
public void setDescriptorIndex(int index)
public String getTypeName()
public void setTypeName(String name)
public Class getType() throws ClassNotFoundException
public void setType(Class type)
protected void readData(DataInput in) throws IOException
protected void writeData(DataOutput out) throws IOException
public void acceptVisit(BCVisitor visit)
|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |