Class Classes

java.lang.Object
  extended byTreeNode
      extended byListNode
          extended byClasses

class Classes
extends ListNode

Defines list phylum Classes

See ListNode for full documentation.


Field Summary
static java.lang.Class elementClass
           
protected  int lineNumber
          line in the source file from which this node came.
 
Constructor Summary
  Classes(int lineNumber)
          Creates an empty "Classes" list
protected Classes(int lineNumber, java.util.Vector elements)
           
 
Method Summary
 void addElement(TreeNode node)
          Appends an element to the list.
 Classes appendElement(TreeNode elem)
          Appends "Class_" element to this list
protected  AbstractSymbol copy_AbstractSymbol(AbstractSymbol sym)
          Copies an AbstractSymbol value.
protected  java.lang.Boolean copy_Boolean(java.lang.Boolean b)
          Copies a boolean value.
 TreeNode copy()
          Creates a copy of this node.
protected  java.util.Vector copyElements()
          Creates a deep copy of this list.
protected  void dump_AbstractSymbol(java.io.PrintStream out, int n, AbstractSymbol sym)
          Dumps a printable representation of an AbstactSymbol value.
protected  void dump_Boolean(java.io.PrintStream out, int n, java.lang.Boolean b)
          Dumps a printable representation of a boolean value.
protected  void dump_line(java.io.PrintStream out, int n)
          Dumps a printable representation of current line number This method is used internally by the generated AST classes
 void dump(java.io.PrintStream out, int n)
          Pretty-prints this list to this output stream.
 java.lang.Class getElementClass()
          Returns class of this lists's elements
 java.util.Enumeration getElements()
          Retreives the elements of the list as Enumeration.
 int getLength()
          Retreives the length of the list.
 int getLineNumber()
          Retreives the line number from which this node came.
 TreeNode getNth(int n)
          Retreives nth element of the list.
 TreeNode set(TreeNode other)
          Sets the values of this node object to the values of a given node.
 java.lang.String toString()
          Returns a string representation of this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elementClass

public static final java.lang.Class elementClass

lineNumber

protected int lineNumber
line in the source file from which this node came.

Constructor Detail

Classes

protected Classes(int lineNumber,
                  java.util.Vector elements)

Classes

public Classes(int lineNumber)
Creates an empty "Classes" list

Method Detail

getElementClass

public java.lang.Class getElementClass()
Returns class of this lists's elements

Specified by:
getElementClass in class ListNode
Returns:
the element class

appendElement

public Classes appendElement(TreeNode elem)
Appends "Class_" element to this list


copy

public TreeNode copy()
Description copied from class: TreeNode
Creates a copy of this node.

Specified by:
copy in class TreeNode
Returns:
a copy of this node

copyElements

protected java.util.Vector copyElements()
Creates a deep copy of this list. None of the elements are shared between the lists, e.g. all elements are duplicated (which is what "deep copy" means).

Returns:
a copy of this elements vector

getNth

public TreeNode getNth(int n)
Retreives nth element of the list.

Parameters:
n - the index of the element
Returns:
the element

getLength

public int getLength()
Retreives the length of the list.

Returns:
the length of the list

getElements

public java.util.Enumeration getElements()
Retreives the elements of the list as Enumeration.

Returns:
the elements

addElement

public void addElement(TreeNode node)
Appends an element to the list.

Note: each generated subclass of ListNode also has an appendElement() method, which calls addElement() and returns the list of the appropriate type, so that it can be used like this: l.appendElement(i).appendElement(j).appendElement(k);


dump

public void dump(java.io.PrintStream out,
                 int n)
Pretty-prints this list to this output stream.

Specified by:
dump in class TreeNode
Parameters:
out - the output stream
n - the number of spaces to indent the output

toString

public java.lang.String toString()
Returns a string representation of this list.

Returns:
a string representation

set

public TreeNode set(TreeNode other)
Sets the values of this node object to the values of a given node.

Parameters:
other - the other node
Returns:
this node

getLineNumber

public int getLineNumber()
Retreives the line number from which this node came.

Returns:
the line number

copy_Boolean

protected java.lang.Boolean copy_Boolean(java.lang.Boolean b)
Copies a boolean value. This method is used internally by the generated AST classes


copy_AbstractSymbol

protected AbstractSymbol copy_AbstractSymbol(AbstractSymbol sym)
Copies an AbstractSymbol value. This method is used internally by the generated AST classes


dump_Boolean

protected void dump_Boolean(java.io.PrintStream out,
                            int n,
                            java.lang.Boolean b)
Dumps a printable representation of a boolean value. This method is used internally by the generated AST classes


dump_AbstractSymbol

protected void dump_AbstractSymbol(java.io.PrintStream out,
                                   int n,
                                   AbstractSymbol sym)
Dumps a printable representation of an AbstactSymbol value. This method is used internally by the generated AST classes


dump_line

protected void dump_line(java.io.PrintStream out,
                         int n)
Dumps a printable representation of current line number This method is used internally by the generated AST classes