koala.dynamicjava.tree
Class UnaryExpression

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Expression
          extended by koala.dynamicjava.tree.UnaryExpression
All Implemented Interfaces:
ExpressionContainer, SourceInfo.Wrapper
Direct Known Subclasses:
CastExpression, ComplementExpression, MinusExpression, NotExpression, PlusExpression, PostDecrement, PostIncrement, PreDecrement, PreIncrement

public abstract class UnaryExpression
extends Expression
implements ExpressionContainer

This class represents the unary expression nodes of the syntax tree

Version:
1.0 - 1999/04/25
Author:
Stephane Hillion

Field Summary
 
Fields inherited from interface koala.dynamicjava.tree.ExpressionContainer
EXPRESSION
 
Constructor Summary
protected UnaryExpression(Expression exp, SourceInfo si)
          Initializes the expression
 
Method Summary
 Expression getExpression()
          Returns the target expression
 void setExpression(Expression e)
          Sets the target expression
 java.lang.String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.Node
acceptVisitor, archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnaryExpression

protected UnaryExpression(Expression exp,
                          SourceInfo si)
Initializes the expression

Parameters:
exp - the target expression
Throws:
java.lang.IllegalArgumentException - if exp is null
Method Detail

getExpression

public Expression getExpression()
Returns the target expression

Specified by:
getExpression in interface ExpressionContainer

setExpression

public void setExpression(Expression e)
Sets the target expression

Specified by:
setExpression in interface ExpressionContainer
Throws:
java.lang.IllegalArgumentException - if e is null

toString

public java.lang.String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class java.lang.Object