sandmark.util.controlflowgraph
Class MethodCFG
java.lang.Object
|
+--sandmark.util.controlflowgraph.Graph
|
+--sandmark.util.controlflowgraph.MethodCFG
- public class MethodCFG
- extends Graph
Constructor Summary |
MethodCFG(de.fub.bytecode.generic.MethodGen mg)
Constructor. |
MethodCFG(de.fub.bytecode.generic.MethodGen mg,
boolean exceptionsMatter)
|
MethodCFG(de.fub.bytecode.generic.MethodGen mg,
de.fub.bytecode.generic.ConstantPoolGen cpg)
|
MethodCFG(de.fub.bytecode.generic.MethodGen mg,
de.fub.bytecode.generic.ConstantPoolGen cpg,
boolean _exceptionsMatter)
|
Methods inherited from class sandmark.util.controlflowgraph.Graph |
addNode, buildRootList, getPostOrder, getPostOrderIndex, getPreds, getPreOrder, getPreOrderIndex, getSuccs, graph, hasEdge, hasNode, main, nodes, removeNode, removeUnreachable, reverseRoots, roots, size, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
mg
de.fub.bytecode.generic.MethodGen mg
il
de.fub.bytecode.generic.InstructionList il
exceptionHandlers
de.fub.bytecode.generic.CodeExceptionGen[] exceptionHandlers
source
BasicBlock source
sink
BasicBlock sink
initial
BasicBlock initial
leaders
java.util.ArrayList leaders
blockList
java.util.ArrayList blockList
loopTree
Graph loopTree
domEdgeModCount
int domEdgeModCount
loopEdgeModCount
int loopEdgeModCount
maxLoopDepth
int maxLoopDepth
maxLocals
int maxLocals
mCPG
de.fub.bytecode.generic.ConstantPoolGen mCPG
MethodCFG
public MethodCFG(de.fub.bytecode.generic.MethodGen mg)
- Constructor.
MethodCFG
public MethodCFG(de.fub.bytecode.generic.MethodGen mg,
boolean exceptionsMatter)
MethodCFG
public MethodCFG(de.fub.bytecode.generic.MethodGen mg,
de.fub.bytecode.generic.ConstantPoolGen cpg)
MethodCFG
public MethodCFG(de.fub.bytecode.generic.MethodGen mg,
de.fub.bytecode.generic.ConstantPoolGen cpg,
boolean _exceptionsMatter)
constPool
public de.fub.bytecode.generic.ConstantPoolGen constPool()
setConstPool
public void setConstPool(de.fub.bytecode.generic.ConstantPoolGen cpg)
basicBlockIterator
public java.util.Iterator basicBlockIterator()
maxLocals
public int maxLocals()
setMaxLocals
public void setMaxLocals(int newMaxLocals)
methodGen
public de.fub.bytecode.generic.MethodGen methodGen()
maxLoopDepth
public int maxLoopDepth()
newBlock
BasicBlock newBlock()
- Creates a new BasicBlock with the next available label.
newBlock
BasicBlock newBlock(de.fub.bytecode.generic.InstructionHandle ih)
newBlock
BasicBlock newBlock(de.fub.bytecode.generic.InstructionHandle ih,
java.util.ArrayList instructionList)
addBlock
public void addBlock(BasicBlock bb)
addEdge
public void addEdge(GraphNode v,
GraphNode w)
- Overrides:
addEdge
in class Graph
removeEdge
public void removeEdge(GraphNode v,
GraphNode w)
- Overrides:
removeEdge
in class Graph
removeUnreachableBlocks
public void removeUnreachableBlocks()
printCFG
public void printCFG()
toDot
public java.lang.String toDot()
dotInFile
public void dotInFile(java.lang.String filename)
source
public BasicBlock source()
sink
public BasicBlock sink()
init
public BasicBlock init()
instructionList
public de.fub.bytecode.generic.InstructionList instructionList()
shouldIncludeInGraph
boolean shouldIncludeInGraph(GraphNode gn)
- Overrides:
shouldIncludeInGraph
in class Graph