com.go.tea.parsetree
Class Node

java.lang.Object
  |
  +--com.go.tea.parsetree.Node
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
Expression, ExpressionList, Name, Statement, Template, Variable

public abstract class Node
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The superclass of all parse tree nodes. Every Node contains source information and can accept a NodeVisitor.

Version:
25 , 9/07/00
Author:
Brian S O'Neill
See Also:
NodeVisitor, Serialized Form

Constructor Summary
protected Node(SourceInfo info)
           
 
Method Summary
abstract  java.lang.Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 java.lang.Object clone()
          Returns a clone of this Node and all its children.
 SourceInfo getSourceInfo()
           
 java.lang.String toString()
          Returns a String that contains the type of this Node and source information.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

protected Node(SourceInfo info)
Method Detail

getSourceInfo

public final SourceInfo getSourceInfo()

accept

public abstract java.lang.Object accept(NodeVisitor visitor)
Every subclass of Node must override this method with the following: return visitor.visit(this).
Parameters:
visitor - A visitor of this Node
Returns:
Node The Node returned by the visitor
See Also:
NodeVisitor

clone

public java.lang.Object clone()
Returns a clone of this Node and all its children. Immutable child objects are not necessarily cloned
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a String that contains the type of this Node and source information.
Overrides:
toString in class java.lang.Object