public abstract class ControlFlowGraph<V> extends EvoSuiteGraph<V,ControlFlowEdge>
| Modifier and Type | Field and Description |
|---|---|
protected int |
access |
protected String |
className |
protected String |
methodName |
edgeClass, graph, graphId| Modifier | Constructor and Description |
|---|---|
protected |
ControlFlowGraph(String className,
String methodName,
int access)
Creates a fresh and empty CFG for the given class and method
|
protected |
ControlFlowGraph(String className,
String methodName,
int access,
org.jgrapht.graph.DefaultDirectedGraph<V,ControlFlowEdge> jGraph)
Creates a CFG determined by the given jGraph for the given class and
method
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeDiameter()
computeDiameter
|
abstract boolean |
containsInstruction(BytecodeInstruction instruction)
Determines, whether a given instruction is contained in this CFG
|
V |
determineEntryPoint()
determineEntryPoint
|
protected String |
dotSubFolder()
Subclasses can overwrite this method in order to separate their .dot and
.png export to a special folder.
|
void |
finalise()
Computes the diameter of this CFG and the mutation distances
Since both takes some time this is not automatically done on each CFG
GraphPool will automatically call this immediately after the
instantiation of an ActualControlFlowGraph, but not after the creation of
a RawControlFlowGraph
|
abstract String |
getCFGType()
getCFGType
|
String |
getClassName()
Getter for the field
className. |
int |
getCyclomaticComplexity() |
int |
getDiameter()
Returns the Diameter of this CFG
If the diameter of this graph was not computed previously it is computed
first
|
abstract BytecodeInstruction |
getInstruction(int instructionId)
Can be used to retrieve an instruction contained in this CFG identified
by it's instructionId
If no such instruction exists in this CFG, null is returned
|
int |
getMethodAccess()
getMethodAccess
|
String |
getMethodName()
Getter for the field
methodName. |
String |
getName()
getName
|
boolean |
isPublicMethod()
isPublicMethod
|
boolean |
isStaticMethod()
isStaticMethod
|
boolean |
leadsToNode(ControlFlowEdge e,
V b)
leadsToNode
|
addEdge, addEdge, addVertex, addVertices, addVertices, computeReverseJGraph, containsEdge, containsEdge, containsVertex, determineBranches, determineConnectedVertices, determineEntryPoints, determineExitPoints, determineJoins, edgeCount, edgeSet, getChildren, getDistance, getEdge, getEdgeSource, getEdgeTarget, getIsolatedNodes, getNodesWithoutChildren, getParents, getRandomVertex, getSingleChild, hasNPartentsMChildren, incomingEdgesOf, inDegreeOf, isConnected, isDirectSuccessor, isEmpty, outDegreeOf, outgoingEdgesOf, redirectEdges, redirectEdgeSource, redirectEdgeTarget, redirectIncomingEdges, redirectOutgoingEdges, registerEdgeAttributeProvider, registerVertexAttributeProvider, toDot, toFileString, vertexCount, vertexSetprotected String className
protected String methodName
protected int access
protected ControlFlowGraph(String className, String methodName, int access)
protected ControlFlowGraph(String className, String methodName, int access, org.jgrapht.graph.DefaultDirectedGraph<V,ControlFlowEdge> jGraph)
public boolean leadsToNode(ControlFlowEdge e, V b)
leadsToNode
e - a ControlFlowEdge object.b - a V object.public abstract BytecodeInstruction getInstruction(int instructionId)
instructionId - a int.BytecodeInstruction object.public abstract boolean containsInstruction(BytecodeInstruction instruction)
instruction - a BytecodeInstruction object.public void finalise()
public int getDiameter()
public int getCyclomaticComplexity()
protected void computeDiameter()
computeDiameter
public V determineEntryPoint()
determineEntryPoint
public String getMethodName()
Getter for the field methodName.
String object.public int getMethodAccess()
getMethodAccess
public boolean isPublicMethod()
isPublicMethod
public boolean isStaticMethod()
isStaticMethod
public String getName()
getName
getName in class EvoSuiteGraph<V,ControlFlowEdge>String object.protected String dotSubFolder()
dotSubFolder in class EvoSuiteGraph<V,ControlFlowEdge>String object.Copyright © 2010–2017 EvoSuite. All rights reserved.