public abstract class OwExprExpression extends Object
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
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
OwExprExpression(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected OwExprSymbolTable m_symbolTable
protected OwExprErrorTable m_errorTable
protected boolean m_typeError
public OwExprExpression(OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
symbolTable_p
- global symbol table referenceerrorTable_p
- global error table referenceprotected 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 againstOwExprEvaluationException
- 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 evaluationOwExprEvaluationException
- 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
getterpublic final boolean symbolsVisibleInScopes(OwExprExternalScope[] externalScopes_p) throws OwExprEvaluationException
externalScopes_p
- true
if are verifiable symbols are found in the given scopes false
otherwiseOwExprEvaluationException
- 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 nameCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.