| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class is a container for a list of `Instruction's, instructions can be appended, inserted, deleted, etc.. Instructions are being wrapped into InstructionHandle objects that are returned upon append/insert operations. They give the user (read only) access to the list structure, it can be traversed and manipulated in a controlled way. A list is finally dumped to a byte code array with `getByteCode'.
Constructor Summary | |
InstructionList() Create (empty) instruction list. | |
InstructionList(byte[] code) Initialize instruction list from byte array. | |
InstructionList(Instruction i) Initialize list with (nonnull) instruction. | |
InstructionList(CompoundInstruction c) Initialize list with (nonnull) compound instruction. |
Method Summary | |
final InstructionHandle | append(Instruction i, InstructionList il) Append another list after instruction i contained in this list. |
final InstructionHandle | append(InstructionHandle ih, InstructionList il) Append another list after instruction (handle) ih contained in this list. |
final InstructionHandle | append(Instruction i) Append an instruction to the end of this list. |
final BranchHandle | append(BranchInstruction i) Append a branch instruction to the end of this list. |
final InstructionHandle | append(InstructionList il) Append another list to this one. |
final InstructionHandle | append(Instruction i, Instruction j) Append a single instruction j after another instruction i, which must be in this list of course! |
final InstructionHandle | append(Instruction i, CompoundInstruction c) Append a compound instruction, after instruction i. |
final InstructionHandle | append(CompoundInstruction c) Append a compound instruction. |
InstructionList | copy() |
final void | delete(InstructionHandle ih) Remove instruction from this list. |
final void | delete(Instruction i) Remove instruction from this list. |
final void | delete(InstructionHandle from, InstructionHandle to) Remove instructions from instruction `from' to instruction `to' contained in this list. |
final void | delete(Instruction from, Instruction to) Remove instructions from instruction `from' to instruction `to' contained in this list. |
final void | dispose() Delete contents of list. |
Enumeration | elements() |
byte[] | getByteCode() |
InstructionHandle | getEnd() |
int | getLength() |
InstructionHandle | getStart() |
final InstructionHandle | insert(Instruction i, InstructionList il) Insert another list before Instruction i contained in this list. |
final InstructionHandle | insert(InstructionHandle ih, InstructionList il) Insert another list before Instruction handle ih contained in this list. |
final InstructionHandle | insert(Instruction i) Insert an instruction at start of this list. |
final BranchHandle | insert(BranchInstruction i) Insert a branch instruction at start of this list. |
final InstructionHandle | insert(InstructionList il) Insert another list. |
InstructionHandle | insert(Instruction i, Instruction j) Insert a single instruction j before another instruction i, which must be in this list of course! |
final InstructionHandle | insert(Instruction i, CompoundInstruction c) Insert a compound instruction before instruction i. |
final InstructionHandle | insert(CompoundInstruction c) Insert a compound instruction. |
final boolean | isEmpty() Test for empty list. |
final void | setPositions() Give all instructions their position number (offset in byte stream), i.e. |
String | toString() |
Constructor Detail |
public InstructionList()
public InstructionList(byte[] code)
public InstructionList(Instruction i)
public InstructionList(CompoundInstruction c)
Method Detail |
public final InstructionHandle append(Instruction i, InstructionList il)
public final InstructionHandle append(InstructionHandle ih, InstructionList il)
public final InstructionHandle append(Instruction i)
public final BranchHandle append(BranchInstruction i)
public final InstructionHandle append(InstructionList il)
public final InstructionHandle append(Instruction i, Instruction j)
public final InstructionHandle append(Instruction i, CompoundInstruction c)
public final InstructionHandle append(CompoundInstruction c)
public InstructionList copy()
public final void delete(InstructionHandle ih)
public final void delete(Instruction i)
public final void delete(InstructionHandle from, InstructionHandle to)
public final void delete(Instruction from, Instruction to)
public final void dispose()
public Enumeration elements()
public byte[] getByteCode()
public InstructionHandle getEnd()
public int getLength()
public InstructionHandle getStart()
public final InstructionHandle insert(Instruction i, InstructionList il)
public final InstructionHandle insert(InstructionHandle ih, InstructionList il)
public final InstructionHandle insert(Instruction i)
public final BranchHandle insert(BranchInstruction i)
public final InstructionHandle insert(InstructionList il)
public InstructionHandle insert(Instruction i, Instruction j)
public final InstructionHandle insert(Instruction i, CompoundInstruction c)
public final InstructionHandle insert(CompoundInstruction c)
public final boolean isEmpty()
public final void setPositions()
public String toString()
Association Links |
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |