treeNodes
Class Dispatch

java.lang.Object
  extended by generalHelpers.TreeNode
      extended by treeNodes.AbstractExpression
          extended by treeNodes.AbstractDispatch
              extended by treeNodes.Dispatch

public class Dispatch
extends AbstractDispatch

Defines AST constructor 'dispatch'.

See TreeNode for full documentation.


Field Summary
 
Fields inherited from class treeNodes.AbstractDispatch
actual, expr, name
 
Fields inherited from class generalHelpers.TreeNode
lineNumber
 
Constructor Summary
Dispatch(int lineNumber, AbstractExpression expression, AbstractSymbol name, ListNode<AbstractExpression> actuals)
          Creates "dispatch" AST node.
 
Method Summary
 Dispatch copy()
          Creates a copy of this node.
 void dump(java.io.Writer out, int n)
          Pretty-prints this node to this output stream.
 void dumpWithTypes(java.io.Writer out, int n)
           
 
Methods inherited from class treeNodes.AbstractDispatch
getActuals, getExpression
 
Methods inherited from class treeNodes.AbstractExpression
dumpType, getType, setType
 
Methods inherited from class generalHelpers.TreeNode
copyAbstractSymbol, copyBoolean, dumpAbstractSymbol, dumpBoolean, dumpLine, getLineNumber, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dispatch

public Dispatch(int lineNumber,
                AbstractExpression expression,
                AbstractSymbol name,
                ListNode<AbstractExpression> actuals)
Creates "dispatch" AST node.

Parameters:
lineNumber - the line in the source file from which this node came.
expression - initial value for expression to dispatch on
name - initial value for name of method to be called
actuals - initial value for actuals
Method Detail

copy

public Dispatch 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.Writer out,
                 int n)
          throws java.io.IOException
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
Throws:
java.io.IOException

dumpWithTypes

public void dumpWithTypes(java.io.Writer out,
                          int n)
                   throws java.io.IOException
Specified by:
dumpWithTypes in class AbstractExpression
Throws:
java.io.IOException