org.jacorb.notification.filter.etcl

Class MinusOperator

Implemented Interfaces:
TCLParserTokenTypes

public class MinusOperator
extends AbstractTCLNode

A simple node to represent MINUS operation

Version:
$Id: MinusOperator.java,v 1.2 2004/05/06 12:39:59 nicolas Exp $

Fields inherited from interface org.jacorb.notification.filter.etcl.TCLParserTokenTypes

AND, ARRAY, ASSOC, DEFAULT, DISCRIM, DIV, DOLLAR, DOT, EOF, EQ, EXIST, FALSE, FIRST, GT, GTE, IDENTIFIER, IMPLICIT, IN, LBRACKET, LENGTH, LPAREN, LT, LTE, MAX, MIN, MINUS, MULT, NEQ, NOT, NULL_TREE_LOOKAHEAD, NUMBER, NUM_FLOAT, OR, PLUS, RANDOM, RBRACKET, REPO_ID, RPAREN, RUNTIME_VAR, STRING, SUBSTR, TRUE, TYPE, TYPE_ID, UNARY_MINUS, UNARY_PLUS, UNION_POS, WITH, WS

Constructor Summary

MinusOperator(Token tok)

Method Summary

void
acceptInOrder(AbstractTCLVisitor visitor)
accept a visitor for traversal Inorder
void
acceptPostOrder(AbstractTCLVisitor visitor)
accept a visitor for traversal in Postorder.
void
acceptPreOrder(AbstractTCLVisitor visitor)
accept a visitor for traversal in Preorder.
EvaluationResult
evaluate(EvaluationContext context)
Evaluate this Node.
String
getName()
void
setType(int type)
Set AST Token Type for this node.
String
toString()

Methods inherited from class org.jacorb.notification.filter.etcl.AbstractTCLNode

acceptInOrder, acceptPostOrder, acceptPreOrder, evaluate, getKind, getName, getNameForType, getNextType, getType, hasNextSibling, initialize, initialize, initialize, isBoolean, isNumber, isStatic, isString, left, printToStringBuffer, right, setKind, setType, toStringTree

Constructor Details

MinusOperator

public MinusOperator(Token tok)

Method Details

acceptInOrder

public void acceptInOrder(AbstractTCLVisitor visitor)
            throws VisitorException
accept a visitor for traversal Inorder
Overrides:
acceptInOrder in interface AbstractTCLNode

Parameters:
visitor -


acceptPostOrder

public void acceptPostOrder(AbstractTCLVisitor visitor)
            throws VisitorException
accept a visitor for traversal in Postorder. the right and left subtrees are visited before the root node is visited.
Overrides:
acceptPostOrder in interface AbstractTCLNode

Parameters:
visitor -


acceptPreOrder

public void acceptPreOrder(AbstractTCLVisitor visitor)
            throws VisitorException
accept a visitor for traversal in Preorder. the root node is visited before the left and the right subtrees are visited.
Overrides:
acceptPreOrder in interface AbstractTCLNode

Parameters:
visitor -


evaluate

public EvaluationResult evaluate(EvaluationContext context)
            throws EvaluationException
Evaluate this Node.
Overrides:
evaluate in interface AbstractTCLNode

Parameters:
context - an EvaluationContext value contains all context information necessary for the evaluation

Returns:
an EvaluationResult value

Throws:
EvaluationException - these errors mostly occur if e.g. an expression contains a reference to a non-existent struct member or if it is tried to add a string and a number


getName

public String getName()
Overrides:
getName in interface AbstractTCLNode


setType

public void setType(int type)
Set AST Token Type for this node.
Overrides:
setType in interface AbstractTCLNode

Parameters:
type - must be a valid TCLTokenType.

See Also:
TCLParserTokenTypes


toString

public String toString()