|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.expression.language.OwExprExpression
public abstract class OwExprExpression
An expression language compiled expression. Expressions can be obtained from literal representations of expression language expressions. An expression can be evaluated on different scopes.
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 | |
---|---|
protected OwExprErrorTable |
m_errorTable
Global error table reference |
protected OwExprSymbolTable |
m_symbolTable
Global symbol table reference |
protected boolean |
m_typeError
Type error indicating flag - a type error was detected in this expression |
Constructor Summary | |
---|---|
OwExprExpression(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p)
|
Method Summary | |
---|---|
int |
errCount()
Number of errors discovered at compile time |
OwExprValue |
evaluate()
A no external scopes evaluation routine. |
OwExprValue |
evaluate(OwExprExternalScope[] externalScopes_p)
Evaluates this expression. |
abstract OwExprValue |
evaluate(OwExprScope scope_p)
Evaluates this expression on the OwExprScope (scope) provided as argument. |
OwExprErrorTable |
getErrorTable()
Global error table accessor |
OwExprSymbol |
getSymbol(String symbolName_p)
Symbol accessor. |
OwExprSymbolTable |
getSymbolTable()
m_symbolTable getter |
boolean |
hasErrors()
Compile time errors indicator |
protected void |
initType()
Standard expression type initialization method. |
boolean |
symbolsVisibleInScopes(OwExprExternalScope[] externalScopes_p)
Pre-evaluation optional symbol visibility check method. |
abstract OwExprExpressionType |
type()
Type check method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OwExprSymbolTable m_symbolTable
protected OwExprErrorTable m_errorTable
protected boolean m_typeError
Constructor Detail |
---|
public OwExprExpression(OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
symbolTable_p
- global symbol table referenceerrorTable_p
- global error table referenceMethod Detail |
---|
protected final void initType()
m_typeError
)
and the type error is added to the error table (m_errorTable
).
public OwExprValue evaluate() throws OwExprEvaluationException
evaluate(OwExprExternalScope[])
OwExprEvaluationException
- in case of evaluation failurepublic OwExprValue evaluate(OwExprExternalScope[] externalScopes_p) throws OwExprEvaluationException
OwExprSystem
scope (the default top level scope) is added by default
(it is not necessary to be amongs t the exte).
externalScopes_p
- the external scopes this expression is evaluated against
OwExprEvaluationException
- in case of evaluation failurepublic abstract OwExprValue evaluate(OwExprScope scope_p) throws OwExprEvaluationException
OwExprScope
(scope) provided as argument.
scope_p
- external scope to be used during evaluation
OwExprEvaluationException
- in case of evaluation failurepublic abstract OwExprExpressionType type() throws OwExprTypeMissmatchException
m_typeError
should
be set to true
OwExprTypeMissmatchException
- if type errors are encountered during type computationpublic final OwExprSymbolTable getSymbolTable()
m_symbolTable
getter
public final boolean symbolsVisibleInScopes(OwExprExternalScope[] externalScopes_p) throws OwExprEvaluationException
externalScopes_p
-
true
if are verifiable symbols are found in the given scopes false
otherwise
OwExprEvaluationException
- if symbols visibility check failspublic final OwExprErrorTable getErrorTable()
public final boolean hasErrors()
true
if the expression that resulted in this object had compilation errors
(either semantic - type errors or lexical errors), false
otherwisepublic final int errCount()
int
number of errors found at compile timepublic final OwExprSymbol getSymbol(String symbolName_p)
symbolName_p
- requested symbol's name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |