View Javadoc

1   // PrintCFG.java, created Mon Mar 18 16:46:44 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.Compiler.Quad;
5   
6   /***
7    *
8    * @author  John Whaley <jwhaley@alum.mit.edu>
9    * @version $Id: PrintCFG.java 1456 2004-03-09 22:01:46Z jwhaley $
10   */
11  public class PrintCFG implements ControlFlowGraphVisitor {
12  
13      public java.io.PrintStream out = System.out;
14      
15      /*** Creates new PrintCFG */
16      public PrintCFG() {}
17  
18      /*** Sets output stream. */
19      public void setOut(java.io.PrintStream out) { this.out = out; }
20      
21      /*** Prints full dump of the given CFG to the output stream. */
22      public void visitCFG(ControlFlowGraph cfg) { out.println(cfg.fullDump()); }
23      
24  }