Class CgenNode

java.lang.Object
  extended byTreeNode
      extended byClass_
          extended byclass_
              extended byCgenNode

class CgenNode
extends class_


Field Summary
(package private) static int Basic
          Indicates a basic class
protected  Features features
           
protected  AbstractSymbol filename
           
protected  int lineNumber
          line in the source file from which this node came.
protected  AbstractSymbol name
           
(package private) static int NotBasic
          Indicates a class that came from a Cool program
 
Constructor Summary
(package private) CgenNode(Class_ c, int basic_status, CgenClassTable table)
          Constructs a new CgenNode to represent class "c".
 
Method Summary
(package private)  void addChild(CgenNode child)
           
(package private)  boolean basic()
          Returns true is this is a basic class.
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  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_with_types(java.io.PrintStream out, int n)
           
 void dump(java.io.PrintStream out, int n)
          Pretty-prints this node to this output stream.
(package private)  java.util.Enumeration getChildren()
          Gets the children of this class
 Features getFeatures()
           
 AbstractSymbol getFilename()
           
 int getLineNumber()
          Retreives the line number from which this node came.
 AbstractSymbol getName()
           
 AbstractSymbol getParent()
           
(package private)  CgenNode getParentNd()
          Gets the parent of this class
 TreeNode set(TreeNode other)
          Sets the values of this node object to the values of a given node.
(package private)  void setParentNd(CgenNode parent)
          Sets the parent of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Basic

static final int Basic
Indicates a basic class

See Also:
Constant Field Values

NotBasic

static final int NotBasic
Indicates a class that came from a Cool program

See Also:
Constant Field Values

name

protected AbstractSymbol name

features

protected Features features

filename

protected AbstractSymbol filename

lineNumber

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

Constructor Detail

CgenNode

CgenNode(Class_ c,
         int basic_status,
         CgenClassTable table)
Constructs a new CgenNode to represent class "c".

Parameters:
c - the class
basic_status - is this class basic or not
table - the class table
Method Detail

addChild

void addChild(CgenNode child)

getChildren

java.util.Enumeration getChildren()
Gets the children of this class

Returns:
the children

setParentNd

void setParentNd(CgenNode parent)
Sets the parent of this class.

Parameters:
parent - the parent

getParentNd

CgenNode getParentNd()
Gets the parent of this class

Returns:
the parent

basic

boolean basic()
Returns true is this is a basic class.

Returns:
true or false

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

dump

public void dump(java.io.PrintStream out,
                 int n)
Description copied from class: TreeNode
Pretty-prints this node to this output stream.

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

dump_with_types

public void dump_with_types(java.io.PrintStream out,
                            int n)
Specified by:
dump_with_types in class Class_

getName

public AbstractSymbol getName()
Specified by:
getName in class Class_

getParent

public AbstractSymbol getParent()
Specified by:
getParent in class Class_

getFilename

public AbstractSymbol getFilename()
Specified by:
getFilename in class Class_

getFeatures

public Features getFeatures()
Specified by:
getFeatures in class Class_

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