|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.xel.impl.SimpleEvaluator
public class SimpleEvaluator
A simple implementation of Evaluator
.
Constructor Summary | |
---|---|
SimpleEvaluator(FunctionMapper mapper,
java.lang.Class<? extends ExpressionFactory> 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. |
protected ExpressionFactory |
getExpressionFactory()
Returns the expression factory. |
java.lang.Class<? extends ExpressionFactory> |
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. |
protected XelContext |
newXelContext(java.lang.Object ref)
Instantiate a XEL context. |
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<? extends ExpressionFactory> 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 Evaluator
expression
- 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 Evaluator
page
- the page, or null to ignore
XelException
public java.lang.Object evaluate(Component comp, Expression expression) throws XelException
Evaluator
evaluate
in interface Evaluator
comp
- the component, or null to ignore
XelException
public java.lang.Class<? extends ExpressionFactory> getExpressionFactoryClass()
protected ExpressionFactory getExpressionFactory()
protected XelContext newXelContext(java.lang.Object ref)
public FunctionMapper getFunctionMapper(java.lang.Object ref)
Default: returns the function mapper passed thru
SimpleEvaluator(org.zkoss.xel.FunctionMapper, java.lang.Class extends org.zkoss.xel.ExpressionFactory>)
.
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 |