com.wewebu.expression.language
Class OwExprBinaryExpression

java.lang.Object
  extended by com.wewebu.expression.language.OwExprExpression
      extended by com.wewebu.expression.language.OwExprBinaryExpression

public class OwExprBinaryExpression
extends OwExprExpression

Binary expression implementation (a left-operand-operator-right-operand expression).

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Field Summary
 
Fields inherited from class com.wewebu.expression.language.OwExprExpression
m_errorTable, m_symbolTable, m_typeError
 
Constructor Summary
OwExprBinaryExpression(OwExprSymbolTable symTable_p, OwExprErrorTable errorTable_p, OwExprExpression operand1_p, OwExprBinaryOperator operator_p, OwExprExpression operand2_p)
          Constructor
 
Method Summary
 OwExprValue evaluate(OwExprScope scope_p)
          Evaluates this expression on the OwExprScope (scope) provided as argument.
 String toString()
           
 OwExprExpressionType type()
          Type check method.
 
Methods inherited from class com.wewebu.expression.language.OwExprExpression
errCount, evaluate, evaluate, getErrorTable, getSymbol, getSymbolTable, hasErrors, initType, symbolsVisibleInScopes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwExprBinaryExpression

public OwExprBinaryExpression(OwExprSymbolTable symTable_p,
                              OwExprErrorTable errorTable_p,
                              OwExprExpression operand1_p,
                              OwExprBinaryOperator operator_p,
                              OwExprExpression operand2_p)
Constructor

Parameters:
symTable_p - global symbol table
errorTable_p - global error table
operand1_p - left side operand
operator_p - operator
operand2_p - right side operand
Method Detail

evaluate

public OwExprValue evaluate(OwExprScope scope_p)
                     throws OwExprEvaluationException
Evaluates this expression on the OwExprScope (scope) provided as argument.

Specified by:
evaluate in class OwExprExpression
Parameters:
scope_p - external scope to be used during evaluation
Returns:
the value resulted from the evaluation of this expression
Throws:
OwExprEvaluationException - in case of evaluation failure

type

public OwExprExpressionType type()
                          throws OwExprTypeMissmatchException
Type check method. If type errors are encountered during type computation the OwExprExpression.m_typeError should be set to true

Specified by:
type in class OwExprExpression
Returns:
the expression type for this expression
Throws:
OwExprTypeMissmatchException - if type errors are ecountrede during type computation

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.