lab7
Class NodeVisitor

java.lang.Object
  extended by lab7.ReflectiveVisitor
      extended by lab7.NodeVisitor
Direct Known Subclasses:
CourseCodeGenVisitor, CourseProjectCodeGenVisitor, CourseSemanticsVisitor, CourseSymtabVisitor, CourseTypeSetVisitor, DumpNodeVisitor

public abstract class NodeVisitor
extends ReflectiveVisitor

Visitor idea adapted from http://www.javaworld.com/javaworld/javatips/jw-javatip98.html


Field Summary
 
Fields inherited from class lab7.ReflectiveVisitor
debug
 
Constructor Summary
NodeVisitor()
           
 
Method Summary
 void defaultVisit(java.lang.Object o)
          Default visitation if nothing suitable is found
 void err(java.io.PrintStream ps, java.lang.String s)
           
 void err(java.lang.String s)
           
 void out(java.io.PrintStream ps, java.lang.String s)
           
 void out(java.lang.String s)
           
 void setPrintStream(java.io.PrintStream ps)
          Change the output stream.
 
Methods inherited from class lab7.ReflectiveVisitor
dispatch, perform, performVisit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeVisitor

public NodeVisitor()
Method Detail

setPrintStream

public void setPrintStream(java.io.PrintStream ps)
Change the output stream. Default is System.out


defaultVisit

public void defaultVisit(java.lang.Object o)
Default visitation if nothing suitable is found

Specified by:
defaultVisit in class ReflectiveVisitor

err

public void err(java.lang.String s)

err

public void err(java.io.PrintStream ps,
                java.lang.String s)

out

public void out(java.lang.String s)

out

public void out(java.io.PrintStream ps,
                java.lang.String s)