|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExpressionEvaluator
An interface for evaluating expressions in NetUI. Different languages may implement this to expose the language for use in the NetUI JSP tags.
| Method Summary | |
|---|---|
String |
changeContext(String expression,
String oldContext,
String newContext,
int lookupIndex)
Change the evaluation context of an expression. |
boolean |
containsExpression(String expression)
Checks to see if a particular expression contains an expression. |
Object |
evaluateStrict(String expression,
VariableResolver variableResolver)
Evaluate an expression and return the result. |
boolean |
isExpression(String expression)
Checks to see if a particular String is exactly an expression. |
Expression |
parseExpression(String expression)
Parse an atomic expression into a common parsed expression representation. |
String |
qualify(String contextName,
String expression)
Qualify the expression into the given context. |
void |
update(String expression,
Object value,
VariableResolver variableResolver,
boolean requestParameter)
Update an expression with the given value. |
| Method Detail |
|---|
Object evaluateStrict(String expression,
VariableResolver variableResolver)
throws ExpressionEvaluationException
expression - the expression to evaluatevariableResolver - the set of contexts that may be used in expression evaluation. This set
is not necessarily complete as some objects that can be used as top-level expression contexts
may be contained within an object available in this JavaBean.
ExpressionEvaluationException - when an error occurs
void update(String expression,
Object value,
VariableResolver variableResolver,
boolean requestParameter)
throws ExpressionUpdateException
value
to the object referenced by the expression expression. The requestParameter
flag is used by a caller to restrict the set of contexts into which an update can occur on
the request.
expression - the expression whose value to updatevalue - the new value for the updatevariableResolver - the set of contexts that may be used in expression evaluation. This set
is not necessarily complete as some objects that can be used as top-level expression contexts
may be contained within an object available in this JavaBean.requestParameter - a boolean that marks this update as occurring from data in the request, if
true or simply as a regular update.
ExpressionUpdateException
String changeContext(String expression,
String oldContext,
String newContext,
int lookupIndex)
throws ExpressionEvaluationException
expression - the expression whose context to changeoldContext - the old context to replace, if presentnewContext - the new context to replace if the expression starts with the oldContextlookupIndex - an index used to qualify an expression into an array look-up.
ExpressionEvaluationException
String qualify(String contextName,
String expression)
throws ExpressionEvaluationException
expression
and simply qualify it into the new context contextName.
contextName - the new contextexpression - the expression to qualify
ExpressionEvaluationExceptionboolean isExpression(String expression)
expression - the expression to check
true if the expression is exactly an expression; false otherwise.
IllegalExpressionException - if the given expression expression is not legal.boolean containsExpression(String expression)
true if there is an expression surrounded by whitespace, other expressions,
or literal text.
expression - the expression to check
true if the expression contains an expression; false otherwise.Expression parseExpression(String expression)
expression - the String expression to parse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||