Public Methods | |
void | addTargeter (InstructionTargeter t) |
final Instruction | getInstruction () |
final InstructionHandle | getNext () |
int | getPosition () |
final InstructionHandle | getPrev () |
InstructionTargeter[] | getTargeters () |
boolean | hasTargeters () |
void | removeAllTargeters () |
void | removeTargeter (InstructionTargeter t) |
void | setInstruction (Instruction i) |
String | toString () |
String | toString (boolean verbose) |
void | accept (Visitor v) |
void | addAttribute (Object key, Object attr) |
void | addTargeter (InstructionTargeter t) |
Object | getAttribute (Object key) |
final Instruction | getInstruction () |
final InstructionHandle | getNext () |
int | getPosition () |
final InstructionHandle | getPrev () |
InstructionTargeter[] | getTargeters () |
boolean | hasTargeters () |
void | removeAllTargeters () |
void | removeAttribute (Object key) |
void | removeTargeter (InstructionTargeter t) |
void | setInstruction (Instruction i) |
Instruction | swapInstruction (Instruction i) |
String | toString () |
String | toString (boolean verbose) |
Protected Methods | |
InstructionHandle (Instruction i) | |
void | addHandle () |
int | updatePosition (int offset, int max_offset) |
InstructionHandle (Instruction i) | |
void | addHandle () |
int | updatePosition (int offset, int max_offset) |
Protected Attributes | |
int | i_position = -1 |
Private Methods | |
void | dispose () |
void | setPosition (int pos) |
void | dispose () |
void | setPosition (int pos) |
Static Private Methods | |
final InstructionHandle | getInstructionHandle (Instruction i) |
final InstructionHandle | getInstructionHandle (Instruction i) |
Private Attributes | |
InstructionHandle | next |
InstructionHandle | prev |
Instruction | instruction |
Vector | targeters |
Hashtable | attributes |
Static Private Attributes | |
InstructionHandle | ih_list = null |
Within an InstructionList an InstructionHandle object is wrapped around all instructions, i.e. it implements a cell in a doubly-linked list. From the outside only the next and the previous instruction (handle) are accessible. One can traverse the list via an Enumeration returned by InstructionList.elements().
Definition at line 25 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java.
|
Convenience method, simply calls accept() on the contained instruction.
Definition at line 41 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Add an attribute to an instruction handle.
Definition at line 49 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Overridden in BranchHandle Reimplemented in BranchHandle, and BranchHandle. Definition at line 57 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Overridden in BranchHandle Reimplemented in BranchHandle, and BranchHandle. Definition at line 40 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. |
|
Denote this handle is being referenced by t. Definition at line 64 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Denote this handle is being referenced by t. Definition at line 47 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. Referenced by BranchInstruction::notifyTarget().
|
|
Delete contents, i.e., remove user access and make handle reusable. Definition at line 74 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Delete contents, i.e. remove user access and make handle reusable. Definition at line 57 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. Referenced by InstructionList::dispose(), and InstructionList::remove().
|
|
Get attribute of an instruction handle.
Definition at line 87 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Factory method. Definition at line 96 of file src/de/fub/bytecode/generic/InstructionHandle.java. Referenced by InstructionList::insert().
|
|
Definition at line 113 of file src/de/fub/bytecode/generic/InstructionHandle.java. Referenced by CodeExceptionGen::getCodeException(), LineNumberGen::getLineNumber(), LocalVariableGen::getLocalVariable(), and BranchInstruction::getTargetOffset().
|
|
Definition at line 118 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Definition at line 86 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. |
|
Remove all targeters, if any. Definition at line 131 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Remove all targeters, if any. Definition at line 99 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. |
|
Delete an attribute of an instruction handle.
Definition at line 139 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Denote this handle isn't referenced anymore by t. Definition at line 146 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Denote this handle isn't referenced anymore by t. Definition at line 106 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. Referenced by Select::dispose(), and BranchInstruction::notifyTarget().
|
|
Replace current instruction contained in this handle. Old instruction is disposed using Instruction.dispose(). Reimplemented in BranchHandle, and BranchHandle. Definition at line 153 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Replace current instruction contained in this handle. Old instruction is disposed using Instruction.dispose(). Reimplemented in BranchHandle, and BranchHandle. Definition at line 113 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. Referenced by getInstructionHandle().
|
|
Set the position, i.e., the byte code offset of the contained instruction. Definition at line 168 of file src/de/fub/bytecode/generic/InstructionHandle.java. Referenced by InstructionList::InstructionList(), and InstructionList::setPositions().
|
|
Temporarily swap the current instruction, without disturbing anything. Meant to be used by a debugger, implementing breakpoints. Current instruction is returned. Definition at line 174 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Definition at line 186 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Definition at line 181 of file src/de/fub/bytecode/generic/InstructionHandle.java. Referenced by InstructionList::remove(), and InstructionList::toString().
|
|
Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions()' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.
Reimplemented in BranchHandle, and BranchHandle. Definition at line 199 of file src/de/fub/bytecode/generic/InstructionHandle.java. |
|
Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.
Reimplemented in BranchHandle, and BranchHandle. Definition at line 143 of file lib/jpf/de/fub/bytecode/generic/InstructionHandle.java. Referenced by InstructionList::setPositions().
|
|
Factory methods. Definition at line 32 of file src/de/fub/bytecode/generic/InstructionHandle.java. |