public class ApacheELFactory extends java.lang.Object implements ExpressionFactory
Available in ZK EE
The org.zkoss.xel.el.ELFactory class is recommended since the implementation it encapsulates has the better performance.
FEATURE_CLASS, FEATURE_FUNCTION
Constructor and Description |
---|
ApacheELFactory() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(XelContext xelc,
java.lang.String expression,
java.lang.Class expectedType)
Evaluates an expression.
|
boolean |
isSupported(int feature)
Returns whether an feature is supported.
|
protected javax.servlet.jsp.el.ExpressionEvaluator |
newExpressionEvaluator()
Returns the EL expression factory.
|
Expression |
parseExpression(XelContext xelc,
java.lang.String expression,
java.lang.Class expectedType)
Prepares (a.k.a., compiles) an expression.
|
public boolean isSupported(int feature)
ExpressionFactory
isSupported
in interface ExpressionFactory
feature
- which feature to query.
It can be a combination of ExpressionFactory.FEATURE_FUNCTION
and ExpressionFactory.FEATURE_CLASS
.public Expression parseExpression(XelContext xelc, java.lang.String expression, java.lang.Class expectedType) throws XelException
ExpressionFactory
parseExpression
in interface ExpressionFactory
xelc
- 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 evaluationXelException
public java.lang.Object evaluate(XelContext xelc, java.lang.String expression, java.lang.Class expectedType) throws XelException
ExpressionFactory
evaluate
in interface ExpressionFactory
xelc
- 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 evaluationXelException
protected javax.servlet.jsp.el.ExpressionEvaluator newExpressionEvaluator()
Default: Use org.apache.commons.el.ExpressionEvaluatorImpl.
You might override it to use a different implementation.
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.