|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.xel.impl.SimpleEvaluator
public class SimpleEvaluator
A simple implementation of Evaluator.
| Constructor Summary | |
|---|---|
SimpleEvaluator(FunctionMapper mapper,
java.lang.Class expfcls)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
evaluate(Component comp,
Expression expression)
Evaluates the expression. |
java.lang.Object |
evaluate(Page page,
Expression expression)
Evaluates the expression. |
java.lang.Class |
getExpressionFactoryClass()
Returns the implementation class of the expression factory, or null to use the default. |
FunctionMapper |
getFunctionMapper(java.lang.Object ref)
Returns the function mapper, or null if not available. |
VariableResolver |
getVariableResolver(java.lang.Object ref)
Returns the variable resolver, or null if not available. |
Expression |
parseExpression(java.lang.String expression,
java.lang.Class expectedType)
Prepares the expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleEvaluator(FunctionMapper mapper,
java.lang.Class expfcls)
expfcls - the class that implements the expression factory.
If null, the default one is used.| Method Detail |
|---|
public Expression parseExpression(java.lang.String expression,
java.lang.Class expectedType)
throws XelException
Evaluator
parseExpression in interface Evaluatorexpression - the expression to be prepared for being evaluated
later.expectedType - the expected type of the result of the evaluation
XelException
public java.lang.Object evaluate(Page page,
Expression expression)
throws XelException
Evaluator
evaluate in interface Evaluatorpage - the page, or null to ignore
XelException
public java.lang.Object evaluate(Component comp,
Expression expression)
throws XelException
Evaluator
evaluate in interface Evaluatorcomp - the component, or null to ignore
XelExceptionpublic java.lang.Class getExpressionFactoryClass()
public FunctionMapper getFunctionMapper(java.lang.Object ref)
Default: returns the function mapper passed thru
SimpleEvaluator(org.zkoss.xel.FunctionMapper, java.lang.Class).
ref - the object,either page, component, or null.
It is passed to evaluate(org.zkoss.zk.ui.Page, org.zkoss.xel.Expression)public VariableResolver getVariableResolver(java.lang.Object ref)
Default: it returns the variable resolver of the
current execution, if any.
Otherwise, it returns the current RequestContext, if any.
If both not available, null is returned.
ref - the object,either page, component, or null.
It is passed to evaluate(org.zkoss.zk.ui.Page, org.zkoss.xel.Expression)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||