de.upb.hni.vmagic.expression
Class BinaryExpression

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.expression.Expression
          extended by de.upb.hni.vmagic.expression.BinaryExpression
All Implemented Interfaces:
Choice
Direct Known Subclasses:
AddingExpression, LogicalExpression, MultiplyingExpression, Pow, RelationalExpression, ShiftExpression

public abstract class BinaryExpression
extends Expression

Abstract base class for binary expressions.


Method Summary
 ExpressionKind getExpressionKind()
          Returns the expression kind
 Expression getLeft()
          Returns the left-hand side expression of this binary exprssion.
 int getPrecedence()
          Returns the precedence of this expression.
 Expression getRight()
          Returns the right-hand side expression of this binary exprssion.
 void setLeft(Expression left)
          Sets the left-hand side expression of this binary expression.
 void setRight(Expression right)
          Sets the right-hand side expression of this binary expression.
 
Methods inherited from class de.upb.hni.vmagic.expression.Expression
getType
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLeft

public Expression getLeft()
Returns the left-hand side expression of this binary exprssion.

Returns:
the left-hand side expression

setLeft

public void setLeft(Expression left)
Sets the left-hand side expression of this binary expression.

Parameters:
left - the left-hand side expression

getRight

public Expression getRight()
Returns the right-hand side expression of this binary exprssion.

Returns:
the right-hand side expression

setRight

public void setRight(Expression right)
Sets the right-hand side expression of this binary expression.

Parameters:
right - the right-hand side expression

getExpressionKind

public ExpressionKind getExpressionKind()
Returns the expression kind

Returns:
the expression kind

getPrecedence

public int getPrecedence()
Description copied from class: Expression
Returns the precedence of this expression.

Specified by:
getPrecedence in class Expression
Returns:
the precedence, higher values mean higher precedence
See Also:
ExpressionPrecedences