Class ELFactory

java.lang.Object
org.zkoss.xel.el.ELFactory
All Implemented Interfaces:
ExpressionFactory

public class ELFactory extends Object implements ExpressionFactory
An implementation based on ZK Commons EL (zcommons-el.jar: org.zkforge.apache.commons.el.ExpressionEvaluatorImpl). ZK commons-EL is a performance enhancement version of Apache Commons EL. It is also independent of JSP 2.0.
Since:
3.0.0
Author:
tomyeh
  • Constructor Details

    • ELFactory

      public ELFactory()
  • Method Details

    • isSupported

      public boolean isSupported(int feature)
      Description copied from interface: ExpressionFactory
      Returns whether an feature is supported.
      Specified by:
      isSupported in interface ExpressionFactory
      Parameters:
      feature - which feature to query. It can be a combination of ExpressionFactory.FEATURE_FUNCTION and ExpressionFactory.FEATURE_CLASS.
    • parseExpression

      public Expression parseExpression(XelContext xelc, String expression, Class expectedType) throws XelException
      Description copied from interface: ExpressionFactory
      Prepares (a.k.a., compiles) an expression.
      Specified by:
      parseExpression in interface ExpressionFactory
      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

      public Object evaluate(XelContext xelc, String expression, Class expectedType) throws XelException
      Description copied from interface: ExpressionFactory
      Evaluates an expression.
      Specified by:
      evaluate in interface ExpressionFactory
      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