soot.util.cfgcmd
Class CFGGraphType

java.lang.Object
  extended by soot.util.cfgcmd.CFGOptionMatcher.CFGOption
      extended by 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
static CFGGraphType ALT_ARRAY_REF_BLOCK_GRAPH
           
static CFGGraphType ALT_BRIEF_BLOCK_GRAPH
           
static CFGGraphType ALT_BRIEF_UNIT_GRAPH
           
static CFGGraphType ALT_COMPLETE_BLOCK_GRAPH
           
static CFGGraphType ALT_COMPLETE_UNIT_GRAPH
           
static CFGGraphType ALT_TRAP_UNIT_GRAPH
           
static CFGGraphType ALT_ZONED_BLOCK_GRAPH
           
static CFGGraphType ARRAY_REF_BLOCK_GRAPH
           
static CFGGraphType BRIEF_BLOCK_GRAPH
           
static CFGGraphType BRIEF_UNIT_GRAPH
           
static CFGGraphType CLASSIC_COMPLETE_BLOCK_GRAPH
           
static CFGGraphType CLASSIC_COMPLETE_UNIT_GRAPH
           
static CFGGraphType COMPLETE_BLOCK_GRAPH
           
static CFGGraphType COMPLETE_UNIT_GRAPH
           
static CFGGraphType EXCEPTIONAL_BLOCK_GRAPH
           
static CFGGraphType EXCEPTIONAL_UNIT_GRAPH
           
static CFGGraphType TRAP_UNIT_GRAPH
           
static CFGGraphType ZONED_BLOCK_GRAPH
           
 
Method Summary
abstract  DirectedGraph buildGraph(Body b)
          Method that will build a graph of this type.
abstract  DotGraph drawGraph(CFGToDotGraph drawer, DirectedGraph g, Body b)
          Method that will draw a DotGraph representation of the control flow in this type of graph.
static CFGGraphType getGraphType(String option)
          Returns the CFGGraphType identified by the passed name.
static String help(int initialIndent, int rightMargin, int hangingIndent)
          Returns a string containing the names of all the available CFGGraphTypes, separated by '|' characters.
 
Methods inherited from class soot.util.cfgcmd.CFGOptionMatcher.CFGOption
name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 method Body from 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 a DotGraph representation of the control flow in this type of graph. This method is intended for use within CFGViewer.

Parameters:
drawer - The CFGToDotGraph object that will draw the graph.
g - The graph to draw.
b - The body associated with the graph, g.
Returns:
a DotGraph visualizing the control flow in g.

getGraphType

public static CFGGraphType getGraphType(String option)
Returns the CFGGraphType identified by the passed name.

Parameters:
name - A String identifying the graph type.
Returns:
A CFGGraphType object whose #buildGraph() method will create the desired sort of control flow graph and whose drawGraph(soot.util.cfgcmd.CFGToDotGraph, soot.toolkits.graph.DirectedGraph, soot.Body) method will produce a DotGraph corresponding to the graph.

help

public static String help(int initialIndent,
                          int rightMargin,
                          int hangingIndent)
Returns a string containing the names of all the available CFGGraphTypes, 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 to rightMargin.
hangingIndent - If positive, this number of spaces will be inserted immediately after each newline inserted to respect the rightMargin.