Class 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 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.
      • 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.