LocalVariable, MethodGen
| Modifier and Type | Field and Description |
|---|---|
| private InstructionHandle | |
| private int | |
| private String | |
| private InstructionHandle | |
| private Type |
| Access | Constructor and Description |
|---|---|
| public | LocalVariableGen(int
index of local variable index, String its name name, Type its type type, InstructionHandle from where the instruction is valid (null means from the start) start, InstructionHandle until where the instruction is valid (null means to the end) end)Generate a local variable that with index `index'. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | Returns: true, if ih is target of this variableImplements org. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public InstructionHandle | |
| public int | |
| public LocalVariable | |
| public String | |
| public InstructionHandle | |
| public Type | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | |
| public void | updateTarget(InstructionHandle
old target, either start or end old_ih, InstructionHandle new target new_ih)Implements org. |
| end | back to summary |
|---|---|
| private InstructionHandle end | |
| index | back to summary |
|---|---|
| private int index | |
| name | back to summary |
|---|---|
| private String name | |
| start | back to summary |
|---|---|
| private InstructionHandle start | |
| type | back to summary |
|---|---|
| private Type type | |
| LocalVariableGen | back to summary |
|---|---|
| public LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end) Generate a local variable that with index `index'. Note that double and long variables need two indexs. Index indices have to be provided by the user.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| containsTarget | back to summary |
|---|---|
| public boolean containsTarget(InstructionHandle ih) Implements org.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. We consider to local variables to be equal, if the use the same index and are valid in the same range.
| |
| getEnd | back to summary |
|---|---|
| public InstructionHandle getEnd() | |
| getIndex | back to summary |
|---|---|
| public int getIndex() | |
| getLocalVariable | back to summary |
|---|---|
| public LocalVariable getLocalVariable(ConstantPool cp) Get LocalVariable object. This relies on that the instruction list has already been dumped to byte code or or that the `setPositions' methods has been called for the instruction list. Note that for local variables whose scope end at the last instruction of the method's code, the JVM specification is ambiguous: both a start_pc+length ending at the last instruction and start_pc+length ending at first index beyond the end of the code are valid.
| |
| getName | back to summary |
|---|---|
| public String getName() | |
| getStart | back to summary |
|---|---|
| public InstructionHandle getStart() | |
| getType | back to summary |
|---|---|
| public Type getType() | |
| setEnd | back to summary |
|---|---|
| public void setEnd(InstructionHandle end) | |
| setIndex | back to summary |
|---|---|
| public void setIndex(int index) | |
| setName | back to summary |
|---|---|
| public void setName(String name) | |
| setStart | back to summary |
|---|---|
| public void setStart(InstructionHandle start) | |
| setType | back to summary |
|---|---|
| public void setType(Type type) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| updateTarget | back to summary |
|---|---|
| public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih) Implements org.
| |