org.teatrove.tea.parsetree
Class BinaryExpression
java.lang.Object
org.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Expression
org.teatrove.tea.parsetree.BinaryExpression
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- ArithmeticExpression, BinaryLogicalExpression, CompareExpression, ConcatenateExpression
public abstract class BinaryExpression
- extends Expression
A BinaryExpression contains a left expression, a right expression and
an operator. BinaryExpressions never evaluate to null.
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
BinaryExpression
public BinaryExpression(SourceInfo info,
Token operator,
Expression left,
Expression right)
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
getOperator
public Token getOperator()
getLeftExpression
public Expression getLeftExpression()
getRightExpression
public Expression getRightExpression()
setLeftExpression
public void setLeftExpression(Expression left)
setRightExpression
public void setRightExpression(Expression right)
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.