tom.library.bytecode
Class CFGViewer

java.lang.Object
  extended by tom.library.bytecode.CFGViewer

public class CFGViewer
extends Object

A dot control flow graph exporter. This class generates a control flow graph for each method of a class.


Nested Class Summary
static class CFGViewer.AllCfg
           
static class CFGViewer.Assign
          Assign the current instruction node to the given InsWrapper.
static class CFGViewer.BuildLabelMap
           
static class CFGViewer.IsMarked
           
static class CFGViewer.Mark
           
static class CFGViewer.OneCfg
           
static class CFGViewer.PrintDotLink
          Prints a link from the `parent' instruction to the current node instruction.
static class CFGViewer.PrintDotNode
          Prints the current instruction node with a suitable label.
static class CFGViewer.UnMark
           
 
Constructor Summary
CFGViewer()
           
 
Method Summary
static void classToDot(ClassNode ast)
          Generates a control flow graph for each method of the given class.
static void main(String[] args)
          Generates the dot control flow graphs for each method of the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CFGViewer

public CFGViewer()
Method Detail

classToDot

public static void classToDot(ClassNode ast)
                       throws VisitFailure
Generates a control flow graph for each method of the given class.

Parameters:
ast - the gom-term subject representing the class.
Throws:
VisitFailure

main

public static void main(String[] args)
Generates the dot control flow graphs for each method of the specified class. Usage : java bytecode.CFGViewer Ex: java bytecode.CFGViewer bytecode.Subject

Parameters:
args - args[0] : the class name