public abstract class Local extends java.lang.Object implements BCEntity, InstructionPtr
| Modifier and Type | Method and Description |
|---|---|
java.lang.ClassLoader |
getClassLoader()
Return the class loader to use when loading related classes.
|
Code |
getCode()
Returns the Code block that owns the Instruction(s) this
InstructionPtr points to.
|
Instruction |
getEnd()
The last
Instruction for which this local is in scope. |
int |
getLength()
Get the number of bytes for which this local has a value in
the code byte array.
|
int |
getLocal()
Get the local variable index of the current frame for this local.
|
java.lang.String |
getName()
Return the name of this local, or null if unset.
|
int |
getNameIndex()
Return the
ConstantPool index of the UTF8Entry that
describes the name of this local. |
int |
getParam()
Return the parameter that this local corresponds to, or -1 if none.
|
ConstantPool |
getPool()
Return the constant pool of the current class.
|
Project |
getProject()
Return the project of the current class.
|
Instruction |
getStart()
Return the instruction marking the beginning of this local.
|
int |
getStartPc()
Return the index into the code byte array at which this local starts.
|
LocalTable |
getTable()
The owning table.
|
int |
getTypeIndex()
Return the
ConstantPool index of the UTF8Entry that
describes this local. |
java.lang.String |
getTypeName()
Return the full name of the local's type, or null if unset.
|
boolean |
isValid()
Return false if this entity has been removed from its parent; in this
case the results of any operations on the entity are undefined.
|
void |
replaceTarget(Instruction oldTarget,
Instruction newTarget)
Replace the given old, likely invalid, target with a new target.
|
void |
setEnd(Instruction end)
Set the last
Instruction for which this local is in scope. |
void |
setLength(int length)
Set the number of bytes for which this local has a value in
the code byte array.
|
void |
setLocal(int index)
Set the local variable index of the current frame for this local.
|
void |
setName(java.lang.String name)
Set the name of this inner local.
|
void |
setNameIndex(int nameIndex)
Set the
ConstantPool index of the UTF8Entry that
describes the name of this local. |
void |
setParam(int param)
Set the method parameter that this local corresponds to.
|
void |
setStart(Instruction instruction)
Set the
Instruction marking the beginning this local. |
void |
setStartPc(int startPc)
Set the index into the code byte array at which this local starts.
|
void |
setType(java.lang.String type)
Set the type of this local.
|
void |
setTypeIndex(int index)
Set the
ConstantPool index of the UTF8Entry that
describes this local. |
void |
updateTargets()
Use the byte indexes read from the class file to calculate and
set references to the target instruction(s) for this ptr.
|
public LocalTable getTable()
public int getLocal()
public void setLocal(int index)
public int getParam()
public void setParam(int param)
public int getStartPc()
public Instruction getStart()
public void setStartPc(int startPc)
public void setStart(Instruction instruction)
Instruction marking the beginning this local.
The instruction must already be a part of the method.
WARNING: if this instruction is deleted, the results are undefined.public Instruction getEnd()
Instruction for which this local is in scope.public int getLength()
public void setEnd(Instruction end)
Instruction for which this local is in scope.
The instruction must already be a part of the method.
WARNING: if this instruction is deleted, the results are undefined.public void setLength(int length)
public void updateTargets()
InstructionPtrupdateTargets in interface InstructionPtrpublic void replaceTarget(Instruction oldTarget, Instruction newTarget)
InstructionPtrreplaceTarget in interface InstructionPtrpublic int getNameIndex()
ConstantPool index of the UTF8Entry that
describes the name of this local. Defaults to 0.public void setNameIndex(int nameIndex)
ConstantPool index of the UTF8Entry that
describes the name of this local.public java.lang.String getName()
public void setName(java.lang.String name)
public int getTypeIndex()
ConstantPool index of the UTF8Entry that
describes this local. Defaults to 0.public void setTypeIndex(int index)
ConstantPool index of the UTF8Entry that
describes this local.public java.lang.String getTypeName()
public void setType(java.lang.String type)
public Project getProject()
BCEntitygetProject in interface BCEntitypublic ConstantPool getPool()
BCEntitypublic java.lang.ClassLoader getClassLoader()
BCEntitygetClassLoader in interface BCEntitypublic boolean isValid()
BCEntitypublic Code getCode()
InstructionPtrgetCode in interface InstructionPtrCopyright © 2002-2013. All Rights Reserved.