|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.techtrader.modules.tools.bytecode
Class LocalVariable

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