public class LocalVariableGen extends Object implements InstructionTargeter, NamedAndTyped, Cloneable
LocalVariable,
MethodGen| Constructor and Description |
|---|
LocalVariableGen(int index,
String name,
Type type,
InstructionHandle start,
InstructionHandle end)
Generate a local variable that with index `index'.
|
LocalVariableGen(int index,
String name,
Type type,
InstructionHandle start,
InstructionHandle end,
int origIndex)
Generates a local variable that with index `index'.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
containsTarget(InstructionHandle ih)
Checks whether this targeter targets the specified instruction handle.
|
boolean |
equals(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() |
boolean |
getLiveToEnd() |
LocalVariable |
getLocalVariable(ConstantPoolGen cp)
Gets LocalVariable object.
|
String |
getName() |
int |
getOrigIndex() |
InstructionHandle |
getStart() |
Type |
getType() |
int |
hashCode() |
void |
setEnd(InstructionHandle end) |
void |
setIndex(int index) |
void |
setLiveToEnd(boolean liveToEnd) |
void |
setName(String name) |
void |
setStart(InstructionHandle start) |
void |
setType(Type type) |
String |
toString() |
void |
updateTarget(InstructionHandle oldIh,
InstructionHandle newIh)
Replaces the target of this targeter from this old handle to the new handle.
|
public LocalVariableGen(int index, 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 LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end, int origIndex)
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)origIndex - index of local variable prior to any changes to indexpublic boolean containsTarget(InstructionHandle ih)
InstructionTargetercontainsTarget in interface InstructionTargeterpublic boolean equals(Object o)
public InstructionHandle getEnd()
public int getIndex()
public boolean getLiveToEnd()
public LocalVariable getLocalVariable(ConstantPoolGen cp)
cp - constant poolpublic String getName()
getName in interface NamedAndTypedpublic int getOrigIndex()
public InstructionHandle getStart()
public Type getType()
getType in interface NamedAndTypedpublic void setEnd(InstructionHandle end)
public void setIndex(int index)
public void setLiveToEnd(boolean liveToEnd)
public void setName(String name)
setName in interface NamedAndTypedpublic void setStart(InstructionHandle start)
public void setType(Type type)
setType in interface NamedAndTypedpublic void updateTarget(InstructionHandle oldIh, InstructionHandle newIh)
InstructionTargeterupdateTarget in interface InstructionTargeteroldIh - old target, either start or endnewIh - new targetCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.