public class RawControlFlowGraph extends ControlFlowGraph<BytecodeInstruction>
access, className, methodNameedgeClass, graph, graphId| Constructor and Description |
|---|
RawControlFlowGraph(ClassLoader classLoader,
String className,
String methodName,
int access)
Constructor for RawControlFlowGraph.
|
| Modifier and Type | Method and Description |
|---|---|
protected ControlFlowEdge |
addEdge(BytecodeInstruction src,
BytecodeInstruction target,
boolean isExceptionEdge)
addEdge
|
boolean |
addVertex(BytecodeInstruction ins)
addVertex
|
boolean |
containsInstruction(BytecodeInstruction instruction)
Determines, whether a given instruction is contained in this CFG
|
BasicBlock |
determineBasicBlockFor(BytecodeInstruction instruction)
determineBasicBlockFor
|
BytecodeInstruction |
determineEntryPoint()
determineEntryPoint
|
Set<BytecodeInstruction> |
determineExitPoints()
determineExitPoints
|
List<BytecodeInstruction> |
determineMethodCalls()
determineMethodCalls
|
List<BytecodeInstruction> |
determineMethodCallsToOwnClass()
determineMethodCallsToOwnClass
|
String |
getCFGType()
getCFGType
|
ClassLoader |
getClassLoader() |
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
|
BytecodeInstruction |
getInstructionWithBiggestId()
getInstructionWithBiggestId
|
BytecodeInstruction |
getInstructionWithSmallestId()
getInstructionWithSmallestId
|
Set<BytecodeInstruction> |
getLaterInstructionsInMethod(BytecodeInstruction v)
Returns the Set of BytecodeInstructions that can potentially be executed
from passing the given BytecodeInstruction until the end of the method of
this CFG is reached.
|
Set<BytecodeInstruction> |
getPreviousInstructionsInMethod(BytecodeInstruction v)
Returns the Set of BytecodeInstructions that can potentially be executed
from entering the method of this CFG until the given BytecodeInstruction
is reached.
|
Set<Use> |
getUsesForDef(Definition def)
getUsesForDef
|
boolean |
hasDefClearPath(DefUse targetDU,
Set<String> handle)
Checks if the given DefUse has a definition-clear path to its methods
exit
|
boolean |
hasDefClearPathFromMethodEntry(Use duVertex)
hasDefClearPathFromMethodEntry
|
boolean |
hasDefClearPathToMethodExit(Definition duVertex)
hasDefClearPathToMethodExit
|
int |
removeIsolatedNodes()
In some cases there can be isolated nodes within a CFG.
|
String |
toString() |
computeDiameter, dotSubFolder, finalise, getClassName, getCyclomaticComplexity, getDiameter, getMethodAccess, getMethodName, getName, isPublicMethod, isStaticMethod, leadsToNodeaddEdge, addEdge, addVertices, addVertices, computeReverseJGraph, containsEdge, containsEdge, containsVertex, determineBranches, determineConnectedVertices, determineEntryPoints, 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, vertexSetpublic RawControlFlowGraph(ClassLoader classLoader, String className, String methodName, int access)
Constructor for RawControlFlowGraph.
public ClassLoader getClassLoader()
public boolean containsInstruction(BytecodeInstruction instruction)
containsInstruction in class ControlFlowGraph<BytecodeInstruction>instruction - a BytecodeInstruction object.public BytecodeInstruction getInstruction(int instructionId)
getInstruction in class ControlFlowGraph<BytecodeInstruction>instructionId - a int.BytecodeInstruction object.protected ControlFlowEdge addEdge(BytecodeInstruction src, BytecodeInstruction target, boolean isExceptionEdge)
addEdge
src - a BytecodeInstruction object.target - a BytecodeInstruction object.isExceptionEdge - a boolean.ControlFlowEdge object.public BasicBlock determineBasicBlockFor(BytecodeInstruction instruction)
determineBasicBlockFor
instruction - a BytecodeInstruction object.BasicBlock object.public BytecodeInstruction determineEntryPoint()
determineEntryPoint
determineEntryPoint in class ControlFlowGraph<BytecodeInstruction>public Set<BytecodeInstruction> determineExitPoints()
determineExitPoints
determineExitPoints in class EvoSuiteGraph<BytecodeInstruction,ControlFlowEdge>public BytecodeInstruction getInstructionWithSmallestId()
getInstructionWithSmallestId
BytecodeInstruction object.public BytecodeInstruction getInstructionWithBiggestId()
getInstructionWithBiggestId
BytecodeInstruction object.public int removeIsolatedNodes()
public Set<BytecodeInstruction> getPreviousInstructionsInMethod(BytecodeInstruction v)
v - a BytecodeInstruction object.Set object.public Set<BytecodeInstruction> getLaterInstructionsInMethod(BytecodeInstruction v)
v - a BytecodeInstruction object.Set object.public Set<Use> getUsesForDef(Definition def)
getUsesForDef
def - a Definition object.Set object.public boolean hasDefClearPathToMethodExit(Definition duVertex)
hasDefClearPathToMethodExit
duVertex - a Definition object.public boolean hasDefClearPathFromMethodEntry(Use duVertex)
hasDefClearPathFromMethodEntry
duVertex - a Use object.public boolean hasDefClearPath(DefUse targetDU, Set<String> handle)
public String getCFGType()
getCFGType
getCFGType in class ControlFlowGraph<BytecodeInstruction>String object.public List<BytecodeInstruction> determineMethodCalls()
determineMethodCalls
List object.public List<BytecodeInstruction> determineMethodCallsToOwnClass()
determineMethodCallsToOwnClass
List object.public boolean addVertex(BytecodeInstruction ins)
addVertex
addVertex in class EvoSuiteGraph<BytecodeInstruction,ControlFlowEdge>ins - a V object.Copyright © 2010–2017 EvoSuite. All rights reserved.