|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wewebu.expression.language.OwExprExpression
com.wewebu.expression.language.OwExprConditionalExpression
public class OwExprConditionalExpression
The short conditional expression parsing result :
1+b>a?'ok':'nok'
1+b>a is the test expression
'ok' is the true expression
'nok' is the false 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 | |
|---|---|
OwExprConditionalExpression(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p,
OwExprExpression test_p,
OwExprExpression trueExpression_p,
OwExprExpression falseExpression_p)
Constructor |
|
| Method Summary | |
|---|---|
OwExprValue |
evaluate(OwExprScope scope_p)
Evaluates this expression : If the m_test expression results in a OwExprBooleanValue equal to OwExprBooleanValue.TRUE than the
m_trueExpression is evaluated end the result returned otherwise the m_falseExpression expression is evaluated
and the result returned. |
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 |
|---|
public OwExprConditionalExpression(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p,
OwExprExpression test_p,
OwExprExpression trueExpression_p,
OwExprExpression falseExpression_p)
symbolTable_p - the global symbol tableerrorTable_p - the global error tabletest_p - the test expressiontrueExpression_p - the true branch expressionfalseExpression_p - the false branch expression| Method Detail |
|---|
public OwExprValue evaluate(OwExprScope scope_p)
throws OwExprEvaluationException
m_test expression results in a OwExprBooleanValue equal to OwExprBooleanValue.TRUE than the
m_trueExpression is evaluated end the result returned otherwise the m_falseExpression expression is evaluated
and the result returned.
evaluate in class OwExprExpressionscope_p -
OwExprEvaluationException
public OwExprExpressionType type()
throws OwExprTypeMissmatchException
OwExprExpression.m_typeError should
be set to true .
The type check is also forced on all dependent expressions m_test,m_trueExpression and m_falseExpression.
type in class OwExprExpressionOwExprTypeMissmatchException - if type errors are encountered during type computationpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||