org.teatrove.tea.parsetree
Class NegateExpression
java.lang.Object
org.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Expression
org.teatrove.tea.parsetree.NegateExpression
- All Implemented Interfaces:
- Serializable, Cloneable
public class NegateExpression
- extends Expression
NegateExpression is a simple unary expression that calculates the negative
value of an expression. The expression it operates on must return a
Number type.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
NegateExpression
public NegateExpression(SourceInfo info,
Expression expr)
accept
public Object accept(NodeVisitor visitor)
- Description copied from class:
Node
- Every subclass of Node must override this method with the following:
return visitor.visit(this).
- Overrides:
accept in class Expression
- Parameters:
visitor - A visitor of this Node
- Returns:
- Node The Node returned by the visitor
- See Also:
NodeVisitor
clone
public Object clone()
- Description copied from class:
Node
- Returns a clone of this Node and all its children. Immutable child
objects are not necessarily cloned
- Overrides:
clone in class Expression
isExceptionPossible
public boolean isExceptionPossible()
- Description copied from class:
Expression
- Returns true if an exception can be thrown while executing this
Expression. By default, returns true only if a type conversion could
cause an exception.
- Overrides:
isExceptionPossible in class Expression
setType
public void setType(Type type)
- Description copied from class:
Expression
- Sets the type of this expression, clearing the conversion chain.
- Overrides:
setType in class Expression
getExpression
public Expression getExpression()
setExpression
public void setExpression(Expression expr)
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.