treeNodes
Class AbstractBinaryOperation

java.lang.Object
  extended by generalHelpers.TreeNode
      extended by treeNodes.AbstractExpression
          extended by treeNodes.AbstractBinaryOperation
Direct Known Subclasses:
Divide, Eq, Leq, Lt, Mul, Plus, Sub

public abstract class AbstractBinaryOperation
extends AbstractExpression

This class is used to join the common code of all binary operations. From this class all binary operations (arithmetical, logical and comparative) are derived.


Field Summary
protected  AbstractExpression e1
           
protected  AbstractExpression e2
           
 
Fields inherited from class generalHelpers.TreeNode
lineNumber
 
Constructor Summary
AbstractBinaryOperation(int lineNumber, AbstractExpression a1, AbstractExpression a2)
           
 
Method Summary
 void dump(java.io.Writer out, int n)
          Pretty-prints this node to this output stream.
 void dumpWithTypes(java.io.Writer out, int n)
           
 AbstractExpression getExpr1()
           
 AbstractExpression getExpr2()
           
protected abstract  java.lang.String getTag()
          This function is used by the dump-functions to specialize output to the subclass.
 
Methods inherited from class treeNodes.AbstractExpression
dumpType, getType, setType
 
Methods inherited from class generalHelpers.TreeNode
copy, 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
 

Field Detail

e1

protected AbstractExpression e1

e2

protected AbstractExpression e2
Constructor Detail

AbstractBinaryOperation

public AbstractBinaryOperation(int lineNumber,
                               AbstractExpression a1,
                               AbstractExpression a2)
Method Detail

getExpr1

public AbstractExpression getExpr1()

getExpr2

public AbstractExpression getExpr2()

dumpWithTypes

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

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

getTag

protected abstract java.lang.String getTag()
This function is used by the dump-functions to specialize output to the subclass.

Returns:
a tag specific to the subclass