Package org.zkoss.xel

Interface ExpressionFactory

    • Method Detail

      • isSupported

        boolean isSupported​(int feature)
        Returns whether an feature is supported.
        Parameters:
        feature - which feature to query. It can be a combination of FEATURE_FUNCTION and FEATURE_CLASS.
      • parseExpression

        Expression parseExpression​(XelContext ctx,
                                   java.lang.String expression,
                                   java.lang.Class<?> expectedType)
                            throws XelException
        Prepares (a.k.a., compiles) an expression.
        Parameters:
        ctx - 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

        java.lang.Object evaluate​(XelContext ctx,
                                  java.lang.String expression,
                                  java.lang.Class<?> expectedType)
                           throws XelException
        Evaluates an expression.
        Parameters:
        ctx - 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