public class LocalVariableGen extends java.lang.Object implements InstructionTargeter, java.lang.Cloneable, java.io.Serializable
LocalVariable
,
MethodGen
,
Serialized FormConstructor and Description |
---|
LocalVariableGen(int index,
java.lang.String name,
Type type,
InstructionHandle start,
InstructionHandle end)
Generate a local variable that with index `index'.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
containsTarget(InstructionHandle ih) |
boolean |
equals(java.lang.Object o)
We consider to local variables to be equal, if the use the same index and are valid in the same range.
|
InstructionHandle |
getEnd() |
int |
getIndex() |
LocalVariable |
getLocalVariable(ConstantPool cp)
Get LocalVariable object.
|
java.lang.String |
getName() |
InstructionHandle |
getStart() |
Type |
getType() |
void |
setEnd(InstructionHandle end) |
void |
setIndex(int index) |
void |
setName(java.lang.String name) |
void |
setStart(InstructionHandle start) |
void |
setType(Type type) |
java.lang.String |
toString() |
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih) |
public LocalVariableGen(int index, java.lang.String name, Type type, InstructionHandle start, InstructionHandle end)
index
- index of local variablename
- its nametype
- its typestart
- from where the instruction is valid (null means from the start)end
- until where the instruction is valid (null means to the end)public LocalVariable getLocalVariable(ConstantPool cp)
il
- instruction list (byte code) which this variable belongs tocp
- constant poolpublic void setIndex(int index)
public int getIndex()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setType(Type type)
public Type getType()
public InstructionHandle getStart()
public InstructionHandle getEnd()
public void setStart(InstructionHandle start)
public void setEnd(InstructionHandle end)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
updateTarget
in interface InstructionTargeter
old_ih
- old target, either start or endnew_ih
- new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget
in interface InstructionTargeter
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object