Package soot.util.cfgcmd
Class CFGGraphType
- java.lang.Object
-
- soot.util.cfgcmd.CFGOptionMatcher.CFGOption
-
- soot.util.cfgcmd.CFGGraphType
-
public abstract class CFGGraphType extends CFGOptionMatcher.CFGOption
An enumeration type for representing the varieties of control flow graph available, for use in tools that compare or display CFGs.
-
-
Field Summary
Fields Modifier and Type Field Description static CFGGraphTypeALT_ARRAY_REF_BLOCK_GRAPHstatic CFGGraphTypeALT_BRIEF_BLOCK_GRAPHstatic CFGGraphTypeALT_BRIEF_UNIT_GRAPHstatic CFGGraphTypeALT_COMPLETE_BLOCK_GRAPHstatic CFGGraphTypeALT_COMPLETE_UNIT_GRAPHstatic CFGGraphTypeALT_TRAP_UNIT_GRAPHstatic CFGGraphTypeALT_ZONED_BLOCK_GRAPHstatic CFGGraphTypeARRAY_REF_BLOCK_GRAPHstatic CFGGraphTypeBRIEF_BLOCK_GRAPHstatic CFGGraphTypeBRIEF_UNIT_GRAPHstatic CFGGraphTypeCLASSIC_COMPLETE_BLOCK_GRAPHstatic CFGGraphTypeCLASSIC_COMPLETE_UNIT_GRAPHstatic CFGGraphTypeCOMPLETE_BLOCK_GRAPHstatic CFGGraphTypeCOMPLETE_UNIT_GRAPHstatic CFGGraphTypeEXCEPTIONAL_BLOCK_GRAPHstatic CFGGraphTypeEXCEPTIONAL_UNIT_GRAPHstatic CFGGraphTypeTRAP_UNIT_GRAPHstatic CFGGraphTypeZONED_BLOCK_GRAPH
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract DirectedGraph<?>buildGraph(Body b)Method that will build a graph of this type.abstract DotGraphdrawGraph(CFGToDotGraph drawer, DirectedGraph<?> g, Body b)Method that will draw aDotGraphrepresentation of the control flow in this type of graph.static CFGGraphTypegetGraphType(String option)Returns theCFGGraphTypeidentified by the passed name.static Stringhelp(int initialIndent, int rightMargin, int hangingIndent)Returns a string containing the names of all the availableCFGGraphTypes, separated by '|' characters.-
Methods inherited from class soot.util.cfgcmd.CFGOptionMatcher.CFGOption
name
-
-
-
-
Field Detail
-
BRIEF_UNIT_GRAPH
public static final CFGGraphType BRIEF_UNIT_GRAPH
-
EXCEPTIONAL_UNIT_GRAPH
public static final CFGGraphType EXCEPTIONAL_UNIT_GRAPH
-
COMPLETE_UNIT_GRAPH
public static final CFGGraphType COMPLETE_UNIT_GRAPH
-
TRAP_UNIT_GRAPH
public static final CFGGraphType TRAP_UNIT_GRAPH
-
CLASSIC_COMPLETE_UNIT_GRAPH
public static final CFGGraphType CLASSIC_COMPLETE_UNIT_GRAPH
-
BRIEF_BLOCK_GRAPH
public static final CFGGraphType BRIEF_BLOCK_GRAPH
-
EXCEPTIONAL_BLOCK_GRAPH
public static final CFGGraphType EXCEPTIONAL_BLOCK_GRAPH
-
COMPLETE_BLOCK_GRAPH
public static final CFGGraphType COMPLETE_BLOCK_GRAPH
-
CLASSIC_COMPLETE_BLOCK_GRAPH
public static final CFGGraphType CLASSIC_COMPLETE_BLOCK_GRAPH
-
ARRAY_REF_BLOCK_GRAPH
public static final CFGGraphType ARRAY_REF_BLOCK_GRAPH
-
ZONED_BLOCK_GRAPH
public static final CFGGraphType ZONED_BLOCK_GRAPH
-
ALT_BRIEF_UNIT_GRAPH
public static final CFGGraphType ALT_BRIEF_UNIT_GRAPH
-
ALT_COMPLETE_UNIT_GRAPH
public static final CFGGraphType ALT_COMPLETE_UNIT_GRAPH
-
ALT_TRAP_UNIT_GRAPH
public static final CFGGraphType ALT_TRAP_UNIT_GRAPH
-
ALT_ARRAY_REF_BLOCK_GRAPH
public static final CFGGraphType ALT_ARRAY_REF_BLOCK_GRAPH
-
ALT_BRIEF_BLOCK_GRAPH
public static final CFGGraphType ALT_BRIEF_BLOCK_GRAPH
-
ALT_COMPLETE_BLOCK_GRAPH
public static final CFGGraphType ALT_COMPLETE_BLOCK_GRAPH
-
ALT_ZONED_BLOCK_GRAPH
public static final CFGGraphType ALT_ZONED_BLOCK_GRAPH
-
-
Method Detail
-
buildGraph
public abstract DirectedGraph<?> buildGraph(Body b)
Method that will build a graph of this type.- Parameters:
b- The methodBodyfrom which to build the graph.- Returns:
- The control flow graph corresponding to
b
-
drawGraph
public abstract DotGraph drawGraph(CFGToDotGraph drawer, DirectedGraph<?> g, Body b)
Method that will draw aDotGraphrepresentation of the control flow in this type of graph. This method is intended for use withinCFGViewer.- Parameters:
drawer- TheCFGToDotGraphobject that will draw the graph.g- The graph to draw.b- The body associated with the graph,g.- Returns:
- a
DotGraphvisualizing the control flow ing.
-
getGraphType
public static CFGGraphType getGraphType(String option)
Returns theCFGGraphTypeidentified by the passed name.- Parameters:
option- AStringidentifying the graph type.- Returns:
- A
CFGGraphTypeobject whose#buildGraph()method will create the desired sort of control flow graph and whosedrawGraph(soot.util.cfgcmd.CFGToDotGraph, soot.toolkits.graph.DirectedGraph<?>, soot.Body)method will produce aDotGraphcorresponding to the graph.
-
help
public static String help(int initialIndent, int rightMargin, int hangingIndent)
Returns a string containing the names of all the availableCFGGraphTypes, separated by '|' characters.- Parameters:
initialIndent- The number of blank spaces to insert at the beginning of the returned string. Ignored if negative.rightMargin- If positive, newlines will be inserted to try to keep the length of each line in the returned string less than or equal torightMargin.hangingIndent- If positive, this number of spaces will be inserted immediately after each newline inserted to respect therightMargin.
-
-