public class ELFactory extends Object implements ExpressionFactory
| Modifier and Type | Field and Description |
|---|---|
protected org.zkoss.zel.ExpressionFactory |
_expf |
FEATURE_CLASS, FEATURE_FUNCTION| Constructor and Description |
|---|
ELFactory() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(XelContext xelc,
String expression,
Class expectedType)
Evaluates an expression.
|
boolean |
isSupported(int feature)
Returns whether an feature is supported.
|
protected org.zkoss.zel.ELContext |
newELContext(XelContext xelc) |
protected org.zkoss.zel.ExpressionFactory |
newExpressionFactory()
Returns the EL expression factory.
|
Expression |
parseExpression(XelContext xelc,
String expression,
Class expectedType)
Prepares (a.k.a., compiles) an expression.
|
public boolean isSupported(int feature)
ExpressionFactoryisSupported in interface ExpressionFactoryfeature - which feature to query.
It can be a combination of ExpressionFactory.FEATURE_FUNCTION
and ExpressionFactory.FEATURE_CLASS.public Expression parseExpression(XelContext xelc, String expression, Class expectedType) throws XelException
ExpressionFactoryparseExpression in interface ExpressionFactoryxelc - the context information to prepare the expression.
It can be null, in which case no functions are supported for this
invocation.expression - the expression to be evaluated.expectedType - the expected type of the result of the evaluationXelExceptionpublic Object evaluate(XelContext xelc, String expression, Class expectedType) throws XelException
ExpressionFactoryevaluate in interface ExpressionFactoryxelc - the context information to evaluate an expression.
It can be null, in which case no functions are supported for this
invocation.expression - the expression to be evaluated.
Note: the expression is enclosed
with ${ and }, regardless of what implementation is used.expectedType - the expected type of the result of the evaluationXelExceptionprotected org.zkoss.zel.ELContext newELContext(XelContext xelc)
protected org.zkoss.zel.ExpressionFactory newExpressionFactory()
Default: Use org.zkoss.zel.impl.ExpressionFactoryImpl.
You might override it to use a different implementation.
Copyright © 2018. All rights reserved.