Package org.zkoss.xel.zel
Class ELFactory
java.lang.Object
org.zkoss.xel.zel.ELFactory
- All Implemented Interfaces:
ExpressionFactory
- Direct Known Subclasses:
BindXelFactory
An XEL ExpressionFactory implementation based on ZEL ExpressionFactory.
- Since:
- 6.0.0
- Author:
- henrichen
-
Field Summary
FieldsFields inherited from interface org.zkoss.xel.ExpressionFactory
FEATURE_CLASS, FEATURE_FUNCTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(XelContext xelc, String expression, Class expectedType) Evaluates an expression.booleanisSupported(int feature) Returns whether an feature is supported.protected ELContextnewELContext(XelContext xelc) protected ExpressionFactoryReturns the EL expression factory.parseExpression(XelContext xelc, String expression, Class expectedType) Prepares (a.k.a., compiles) an expression.
-
Field Details
-
_expf
-
-
Constructor Details
-
ELFactory
public ELFactory()
-
-
Method Details
-
isSupported
public boolean isSupported(int feature) Description copied from interface:ExpressionFactoryReturns whether an feature is supported.- Specified by:
isSupportedin interfaceExpressionFactory- Parameters:
feature- which feature to query. It can be a combination ofExpressionFactory.FEATURE_FUNCTIONandExpressionFactory.FEATURE_CLASS.
-
parseExpression
public Expression parseExpression(XelContext xelc, String expression, Class expectedType) throws XelException Description copied from interface:ExpressionFactoryPrepares (a.k.a., compiles) an expression.- Specified by:
parseExpressionin interfaceExpressionFactory- Parameters:
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 evaluation- Throws:
XelException
-
evaluate
Description copied from interface:ExpressionFactoryEvaluates an expression.- Specified by:
evaluatein interfaceExpressionFactory- Parameters:
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 evaluation- Throws:
XelException
-
newELContext
-
newExpressionFactory
Returns the EL expression factory.Default: Use org.zkoss.zel.impl.ExpressionFactoryImpl.
You might override it to use a different implementation.
-