|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpressionEvaluatorImpl
public class ExpressionEvaluatorImpl
Nested Class Summary | |
---|---|
static class |
ExpressionEvaluatorImpl.NetUIELEngineFactory
|
Constructor Summary | |
---|---|
ExpressionEvaluatorImpl()
|
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. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionEvaluatorImpl()
Method Detail |
---|
public Object evaluateStrict(String expression, VariableResolver variableResolver) throws ExpressionEvaluationException
ExpressionEvaluator
evaluateStrict
in interface ExpressionEvaluator
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 occurspublic void update(String expression, Object value, VariableResolver variableResolver, boolean requestParameter) throws ExpressionUpdateException
ExpressionEvaluator
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.
update
in interface ExpressionEvaluator
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
public String changeContext(String expression, String oldContext, String newContext, int lookupIndex) throws ExpressionEvaluationException
ExpressionEvaluator
changeContext
in interface ExpressionEvaluator
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 oldContext
lookupIndex
- an index used to qualify an expression into an array look-up.
ExpressionEvaluationException
public String qualify(String contextName, String expression) throws ExpressionEvaluationException
ExpressionEvaluator
expression
and simply qualify it into the new context contextName
.
qualify
in interface ExpressionEvaluator
contextName
- the new contextexpression
- the expression to qualify
ExpressionEvaluationException
public boolean isExpression(String expression)
ExpressionEvaluator
isExpression
in interface ExpressionEvaluator
expression
- the expression to check
true
if the expression is exactly an expression; false
otherwise.public boolean containsExpression(String expression)
ExpressionEvaluator
true
if there is an expression surrounded by whitespace, other expressions,
or literal text.
containsExpression
in interface ExpressionEvaluator
expression
- the expression to check
true
if the expression contains an expression; false
otherwise.public Expression parseExpression(String expression)
ExpressionEvaluator
parseExpression
in interface ExpressionEvaluator
expression
- the String expression to parse
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |