|
||||||||||
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.OwExprStaticArray
public class OwExprStaticArray
An expression representing a static array (inlined array value like {1,2,3} ).
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 | |
---|---|
OwExprStaticArray(OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p)
|
Method Summary | |
---|---|
void |
add(OwExprExpression expression_p)
Parse time construction method. |
OwExprProperty |
at(int index_p)
Indexed scope access method |
OwExprValue |
evaluate(OwExprScope scope_p)
Evaluates this expression on the OwExprScope (scope) provided as argument. |
OwExprExpression |
expression()
|
OwExprFunction |
function(String functionName_p,
OwExprExpressionType[] argunmentTyes_p)
Function access method. |
boolean |
hasProperty(String propertyName_p)
Property access helper method. |
int |
length()
Indexed scope access helper method |
OwExprProperty |
property(String propertyName_p)
Property access method. |
OwExprFunctionSymbol |
regressToFunction()
Forces this primary prefix symbol to a function. |
OwExprPropertySymbol |
regressToPorperty()
Forces this primary prefix symbol to a property. |
OwExprSymbolScope |
regressToScope()
Forces this primary prefix to a scope symbol. |
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 OwExprStaticArray(OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
Method Detail |
---|
public void add(OwExprExpression expression_p)
expression_p
- array item expressionpublic OwExprValue evaluate(OwExprScope scope_p) throws OwExprEvaluationException
OwExprExpression
OwExprScope
(scope) provided as argument.
evaluate
in class OwExprExpression
scope_p
- external scope to be used during evaluation
OwExprEvaluationException
- in case of evaluation failurepublic OwExprExpressionType type() throws OwExprTypeMissmatchException
OwExprExpression
OwExprExpression.m_typeError
should
be set to true
type
in class OwExprExpression
OwExprTypeMissmatchException
- if type errors are encountered during type computationpublic OwExprExpression expression()
expression
in interface OwExprPrimaryPrefix
public OwExprFunctionSymbol regressToFunction() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToFunction
in interface OwExprPrimaryPrefix
OwExprTypeMissmatchException
- if a type mismatch is detected during function symbol creationpublic OwExprPropertySymbol regressToPorperty() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToPorperty
in interface OwExprPrimaryPrefix
OwExprTypeMissmatchException
- if a type mismatch is detected during property symbol creationpublic OwExprSymbolScope regressToScope() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToScope
in interface OwExprPrimaryPrefix
OwExprTypeMissmatchException
- if a type mismatch is detected during scope symbol creationpublic OwExprProperty at(int index_p) throws OwExprEvaluationException
OwExprScope
at
in interface OwExprScope
index_p
- int
index of the requested property
OwExprProperty
property found at the requested index
OwExprEvaluationException
- if the requested indexed access has failed (index out of bounds,
the creation of OwExprProperty
has failed)public OwExprFunction function(String functionName_p, OwExprExpressionType[] argunmentTyes_p) throws OwExprEvaluationException
OwExprScope
function
in interface OwExprScope
functionName_p
- the name of the requested functionargunmentTyes_p
- array of OwExprExpressionType
that defines the argument signature
of the requested function
OwExprFunction
with the requested name and argument signature residing in this scope
OwExprEvaluationException
- if the requested function is not found in this scope or
the creation of the corresponding OwExprFunction
has failedpublic boolean hasProperty(String propertyName_p) throws OwExprEvaluationException
OwExprScope
hasProperty
in interface OwExprScope
propertyName_p
- the name of the requested property
true
if this scope can perform property access for the requested property
- an access via OwExprScope.property(String)
will NOT fail on missing property grounds,
false
otherwise
OwExprEvaluationException
- if the property validity check has failedpublic int length() throws OwExprEvaluationException
OwExprScope
length
in interface OwExprScope
OwExprEvaluationException
public OwExprProperty property(String propertyName_p) throws OwExprEvaluationException
OwExprScope
property
in interface OwExprScope
propertyName_p
- the name of the requested property
OwExprProperty
with the requested name residing in this scope
OwExprEvaluationException
- if the requested property is not found in this scope or
the creation of the corresponding OwExprProperty
has failedpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |