org.apache.jdo.impl.jdoql.tree
Class UnaryExpr

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.CommonAST
          extended byorg.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
              extended byorg.apache.jdo.impl.jdoql.tree.NodeImpl
                  extended byorg.apache.jdo.impl.jdoql.tree.Expr
                      extended byorg.apache.jdo.impl.jdoql.tree.UnaryExpr
All Implemented Interfaces:
antlr.collections.AST, java.lang.Cloneable, Expression, Node, java.io.Serializable, UnaryExpression
Direct Known Subclasses:
ComplementExpr, NotExpr, UnaryMinusExpr, UnaryPlusExpr

public abstract class UnaryExpr
extends Expr
implements UnaryExpression

This node represents a unary operator. All unary operators have exactly one children. Examples of binary operators are ComplementExpression and NotExpression.

Author:
Michael Watzek
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jdo.impl.jdoql.tree.NodeImpl
children, clazz, msg, object, parent
 
Fields inherited from class org.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
column, line, typeInfo
 
Fields inherited from class antlr.CommonAST
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
  UnaryExpr()
          The noarg constructor is needed for ANTLR support and deserialization.
(package private) UnaryExpr(int tokenType, java.lang.String tokenName, Expression expr)
          This constructor is called by specialized nodes.
 
Method Summary
 Expression getExpression()
          Returns the node's expression.
 
Methods inherited from class org.apache.jdo.impl.jdoql.tree.NodeImpl
arrive, ASTToChildren, clone, getChildren, getJavaClass, getObject, getParent, getTokenType, leave, setChildren, setObject, setParent, toString, walkNextChild
 
Methods inherited from class org.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
getColumn, getLine, getTypeInfo, initialize, initialize, initialize, setColumn, setLine, setTypeInfo, treeToString
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jdo.jdoql.tree.Node
arrive, getChildren, getJavaClass, getObject, getParent, getTokenType, leave, setObject, setParent, walkNextChild
 

Constructor Detail

UnaryExpr

public UnaryExpr()
The noarg constructor is needed for ANTLR support and deserialization. The caller must make sure to set the ANTLR tree structure himself or, call setChildren optionally.


UnaryExpr

UnaryExpr(int tokenType,
          java.lang.String tokenName,
          Expression expr)
This constructor is called by specialized nodes. It calls setChildren in order to initialize the node's child expr.

Parameters:
tokenType - the token tpye
tokenName - the name of this node
expr - the first child
Method Detail

getExpression

public Expression getExpression()
Returns the node's expression.

Specified by:
getExpression in interface UnaryExpression
Returns:
the node's expression