junit.quilt.cover.generic
Class ControlFlowGraph
java.lang.Object
|
+--org.apache.commons.graph.domain.basic.DirectedGraphImpl
|
+--junit.quilt.cover.generic.ControlFlowGraph
- All Implemented Interfaces:
- org.apache.commons.graph.DirectedGraph, org.apache.commons.graph.Graph, java.lang.reflect.InvocationHandler, org.apache.commons.graph.MutableDirectedGraph, org.apache.commons.graph.WeightedGraph
- public class ControlFlowGraph
- extends org.apache.commons.graph.domain.basic.DirectedGraphImpl
- implements org.apache.commons.graph.DirectedGraph
Constructor Summary |
ControlFlowGraph(InstContext context,
org.apache.bcel.generic.MethodGen method)
This constructs an empty ControlFlowGraph
for the current class. |
Methods inherited from class org.apache.commons.graph.domain.basic.DirectedGraphImpl |
addContract, addEdge, addVertex, getEdges, getEdges, getInbound, getOutbound, getSource, getTarget, getVertices, getVertices, getWeight, invoke, removeContract, removeEdge, removeVertex, setWeight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.graph.DirectedGraph |
getInbound, getOutbound, getSource, getTarget |
Methods inherited from interface org.apache.commons.graph.Graph |
getEdges, getEdges, getVertices, getVertices |
ControlFlowGraph
public ControlFlowGraph(InstContext context,
org.apache.bcel.generic.MethodGen method)
- This constructs an empty ControlFlowGraph
for the current class.
You need to call "initialize()" before the
graph is valid.
initialize
public void initialize(EdgeFactory factory)
getStackContents
public java.lang.String getStackContents(org.apache.bcel.generic.InstructionHandle handle,
org.apache.bcel.classfile.LocalVariableTable locals)
- Given an InstructionHandle, it builds up a String
representing what comprises the top element
of the stack.
It works, by looking at the stack backwards
- Parameters:
handle
- is the handle we want to find the
stack value for.locals
- is a LocalVariableTable which is
used for looking up the name of a variable.
getStartVertex
public BlockVertex getStartVertex()
getEndVertex
public BlockVertex getEndVertex()
setStartVertex
public void setStartVertex(BlockVertex start)
setEndVertex
public void setEndVertex(BlockVertex end)
makeNewLocal
public int makeNewLocal(java.lang.String name,
org.apache.bcel.generic.Type type)
getMethod
public org.apache.bcel.classfile.Method getMethod()
doesHandle
public boolean doesHandle(org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.CodeExceptionGen handler)
getMethodName
public java.lang.String getMethodName()
updateEdge
public void updateEdge(FlowControlEdge edge)
addEdge
public void addEdge(FlowControlEdge edge)
hasInbound
public boolean hasInbound(org.apache.bcel.generic.InstructionHandle instructionHandle)
hasOutbound
public boolean hasOutbound(org.apache.bcel.generic.InstructionHandle instructionHandle)
Copyright © 2001-2002 David Dixon-Peugh. All Rights Reserved.