public class LocalVariableGen extends Object implements InstructionTargeter, NamedAndTyped, Cloneable, Serializable
LocalVariable,
MethodGen,
Serialized Form| Constructor and Description |
|---|
LocalVariableGen(int index,
String name,
Type type,
InstructionHandle start,
InstructionHandle end)
Generate a local variable that with index `index'.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
containsTarget(InstructionHandle ih) |
boolean |
equals(Object o)
We consider two local variables to be equal, if they use the same index and
are valid in the same range.
|
InstructionHandle |
getEnd() |
int |
getIndex() |
LocalVariable |
getLocalVariable(ConstantPoolGen cp)
Get LocalVariable object.
|
String |
getName() |
InstructionHandle |
getStart() |
Type |
getType() |
int |
hashCode() |
void |
setEnd(InstructionHandle end) |
void |
setName(String name) |
void |
setStart(InstructionHandle start) |
void |
setType(Type type) |
String |
toString() |
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih) |
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 LocalVariable getLocalVariable(ConstantPoolGen cp)
il - instruction list (byte code) which this variable belongs tocp - constant poolpublic int getIndex()
public void setName(String name)
setName in interface NamedAndTypedpublic String getName()
getName in interface NamedAndTypedpublic void setType(Type type)
setType in interface NamedAndTypedpublic Type getType()
getType in interface NamedAndTypedpublic InstructionHandle getStart()
public InstructionHandle getEnd()
public final void setStart(InstructionHandle start)
public final void setEnd(InstructionHandle end)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
updateTarget in interface InstructionTargeterold_ih - old target, either start or endnew_ih - new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget in interface InstructionTargeterpublic boolean equals(Object o)
Copyright © 2018–2021 mhoffrogge. All rights reserved.