public class CFGGenerator extends Object
| Constructor and Description |
|---|
CFGGenerator(ClassLoader classLoader,
String className,
String methodName,
org.objectweb.asm.tree.MethodNode node)
Initializes this generator to generate the CFG for the method identified
by the given parameters
Calls registerMethodNode() which in turn calls
BytecodeInstructionPool.registerMethodNode() leading to the creation of
all BytecodeInstruction instances for the method at hand
TODO might not want to give asm.MethodNode to the outside, but rather a
MyMethodNode extended from BytecodeInstruction or something
|
| Modifier and Type | Method and Description |
|---|---|
ActualControlFlowGraph |
computeActualCFG()
Computes the ActualCFG with BasicBlocks rather then BytecodeInstructions
for this RawCFG.
|
String |
getClassName()
Getter for the field
className. |
String |
getMethodName()
Getter for the field
methodName. |
protected RawControlFlowGraph |
getRawGraph()
Getter for the field
rawGraph. |
void |
registerCFGs()
Adds the RawControlFlowGraph created by this instance to the GraphPool,
computes the resulting ActualControlFlowGraph
|
void |
registerControlFlowEdge(int src,
int dst,
org.objectweb.asm.tree.analysis.Frame[] frames,
boolean isExceptionEdge)
Internal management of fields and actual building up of the rawGraph
Is called by the corresponding BytecodeAnalyzer whenever it detects a
control flow edge
|
public CFGGenerator(ClassLoader classLoader, String className, String methodName, org.objectweb.asm.tree.MethodNode node)
public void registerCFGs()
public void registerControlFlowEdge(int src,
int dst,
org.objectweb.asm.tree.analysis.Frame[] frames,
boolean isExceptionEdge)
src - a int.dst - a int.frames - an array of Frame
objects.isExceptionEdge - a boolean.public ActualControlFlowGraph computeActualCFG()
ActualControlFlowGraph object.protected RawControlFlowGraph getRawGraph()
Getter for the field rawGraph.
RawControlFlowGraph object.Copyright © 2010–2017 EvoSuite. All rights reserved.