|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.controlflowgraph.CodeContext
A CodeContext encapsulates an InstructionHandle and an InstructionList to simplify the generation of sequences of code. Instance methods of the CodeContext update the InstructionHandle (the "code pointer") when called to insert or append new instructions in the underlying InstructionList.
Constructor Summary | |
CodeContext(de.fub.bytecode.generic.InstructionList l)
Constructs a CodeContext for the given InstructionList and initializes the code pointer to null. |
|
CodeContext(de.fub.bytecode.generic.InstructionList l,
de.fub.bytecode.generic.InstructionHandle h)
Constructs a CodeContext for the given InstructionList and initializes the code pointer to the given value. |
Method Summary | |
void |
append(de.fub.bytecode.generic.Instruction ins)
Appends an instruction at the code pointer, and updates it. |
de.fub.bytecode.generic.InstructionHandle |
getHandle()
Returns the code pointer. |
void |
getHandle(de.fub.bytecode.generic.InstructionHandle h)
Sets the code pointer. |
void |
insert(de.fub.bytecode.generic.Instruction ins)
Inserts an instruction at the code pointer, and updates it. |
java.lang.String |
toString()
Returns a concise string representation of this CodeContext. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CodeContext(de.fub.bytecode.generic.InstructionList l)
public CodeContext(de.fub.bytecode.generic.InstructionList l, de.fub.bytecode.generic.InstructionHandle h)
Method Detail |
public de.fub.bytecode.generic.InstructionHandle getHandle()
public void getHandle(de.fub.bytecode.generic.InstructionHandle h)
public void append(de.fub.bytecode.generic.Instruction ins)
public void insert(de.fub.bytecode.generic.Instruction ins)
public java.lang.String toString()
toString
in class java.lang.Object
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |