|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quilt.graph.Vertex | +--org.quilt.cl.CodeVertex
A Vertex extended to carry the initial bytecode offset, line number, and an instruction list.
Field Summary | |
protected org.apache.bcel.generic.Instruction |
connInst_
Instruction connecting this vertex to other(s). |
protected int |
endLine_
Line number in source code corresponding to the connecting instruction, or if there is no such instruction, to the last instruction in the block |
protected org.apache.bcel.generic.InstructionList |
ilist
the bytecode iteself |
protected int |
pos
initial offset of first instruction in bytecode |
protected int |
startLine_
Line number in source code corresponding to first instruction, or if there is no such instruction, of the connecting instruction. |
Fields inherited from class org.quilt.graph.Vertex |
connector, graph, index, label_ |
Constructor Summary | |
CodeVertex(ControlFlowGraph g)
Create a code vertex with default bytecode offset, line number, empty instruction list, and no label. |
|
CodeVertex(ControlFlowGraph g,
int position)
Create a code vertex, specifying a non-negative bytecode offset. |
|
CodeVertex(ControlFlowGraph g,
java.lang.String l)
Create a code vertex, specifying a label |
Method Summary | |
org.apache.bcel.generic.Instruction |
getConnInst()
Get connecting instruction. |
int |
getEndLine()
Get the line number in source code corresponding to the connecting instruction or last instruction in the block. |
org.apache.bcel.generic.InstructionList |
getInstructionList()
Get a reference to the InstructionList carried by the vertex. |
int |
getPosition()
Get the bytecode offset of the first instruction. |
int |
getStartLine()
Get the source code line number of the first instruction in a code vertex. |
void |
moveGoto(CodeVertex target)
Move this code vertex's Goto to another code vertex. |
void |
setConnInst(org.apache.bcel.generic.Instruction i)
Set the connecting instruction for this vertex. |
void |
setEndLine(int n)
Set the source line number of the connecting instruction, or of the last line number in the block if there is no connecting instruction. |
void |
setPos(int position)
Set the bytecode offset for the first instruction. |
void |
setStartLine(int n)
Set the source code line number. |
java.lang.String |
toString()
Less verbose toString. |
java.lang.String |
toString(boolean b)
Optionally more verbose method. |
Methods inherited from class org.quilt.graph.Vertex |
above, checkForNull, getConnector, getEdge, getGraph, getIndex, getLabel, getTarget, makeBinary, makeComplex, makeMulti, setConnector, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int pos
protected org.apache.bcel.generic.InstructionList ilist
protected int startLine_
protected int endLine_
protected org.apache.bcel.generic.Instruction connInst_
Constructor Detail |
public CodeVertex(ControlFlowGraph g)
g
- Graph which the vertex belongs to.public CodeVertex(ControlFlowGraph g, int position)
g
- Graph which the vertex belongs to.position
- Offset of the first instruction in the bytecode.public CodeVertex(ControlFlowGraph g, java.lang.String l)
g
- Graph which the vertex belongs to.l
- The String label applied to the vertex.Method Detail |
public org.apache.bcel.generic.Instruction getConnInst()
public void setConnInst(org.apache.bcel.generic.Instruction i)
public org.apache.bcel.generic.InstructionList getInstructionList()
public int getStartLine()
public void setStartLine(int n)
n
- Source code line number.public int getEndLine()
public void setEndLine(int n)
n
- Source code end line number.public int getPosition()
public void setPos(int position)
setPosition
to match the
get
method.
position
- A non-negative integer representing the bytecode
position of the first instruction.public void moveGoto(CodeVertex target)
public java.lang.String toString()
toString.
toString
in class Vertex
public java.lang.String toString(boolean b)
b
- If true, add label (if any) and instruction list.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |