Class BindEvaluatorXImpl

  • All Implemented Interfaces:
    java.io.Serializable, BindEvaluatorX, org.zkoss.zk.xel.Evaluator

    public class BindEvaluatorXImpl
    extends org.zkoss.zk.xel.impl.SimpleEvaluator
    implements BindEvaluatorX
    A simple implementation of BindEvaluatorX.
    Since:
    6.0.0
    Author:
    henrichen
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BindEvaluatorXImpl​(org.zkoss.xel.FunctionMapper mapper, java.lang.Class<? extends org.zkoss.xel.ExpressionFactory> expfcls)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getType​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns the result type of the specified expression.
      java.lang.Object getValue​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Sets the specified value to the property resolved from the specified expression.
      org.zkoss.xel.ValueReference getValueReference​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns the result reference of the specified expression.
      boolean isReadOnly​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns whether the specified expression a read only expression.
      protected org.zkoss.xel.XelContext newXelContext​(BindContext ctx, org.zkoss.zk.ui.Component comp)  
      org.zkoss.xel.ExpressionX parseExpressionX​(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType)
      Prepares the expressionX.
      void setValue​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression, java.lang.Object value)
      Sets the specified value to the property resolved from the specified expression.
      • Methods inherited from class org.zkoss.zk.xel.impl.SimpleEvaluator

        evaluate, evaluate, getExpressionFactory, getExpressionFactoryClass, getFunctionMapper, getVariableResolver, newXelContext, parseExpression
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.zkoss.zk.xel.Evaluator

        evaluate, evaluate, parseExpression
    • Constructor Detail

      • BindEvaluatorXImpl

        public BindEvaluatorXImpl​(org.zkoss.xel.FunctionMapper mapper,
                                  java.lang.Class<? extends org.zkoss.xel.ExpressionFactory> expfcls)
    • Method Detail

      • getValue

        public java.lang.Object getValue​(BindContext ctx,
                                         org.zkoss.zk.ui.Component comp,
                                         org.zkoss.xel.ExpressionX expression)
                                  throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Sets the specified value to the property resolved from the specified expression.
        Specified by:
        getValue in interface BindEvaluatorX
        Parameters:
        ctx - the scoped bind context of this operation
        comp - the scoped component context of this operation
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • setValue

        public void setValue​(BindContext ctx,
                             org.zkoss.zk.ui.Component comp,
                             org.zkoss.xel.ExpressionX expression,
                             java.lang.Object value)
                      throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Sets the specified value to the property resolved from the specified expression.
        Specified by:
        setValue in interface BindEvaluatorX
        Parameters:
        ctx - the scoped bind context of this operation
        comp - the scoped component context of this operation
        expression - the expression that will resolve a property
        value - the value to be set into the resolved property
        Throws:
        org.zkoss.xel.XelException
      • parseExpressionX

        public org.zkoss.xel.ExpressionX parseExpressionX​(BindContext ctx,
                                                          java.lang.String expression,
                                                          java.lang.Class<?> expectedType)
                                                   throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Prepares the expressionX.
        Specified by:
        parseExpressionX in interface BindEvaluatorX
        expression - the expression to be prepared for being evaluated later.
        expectedType - the expected type of the result of the evaluation
        Throws:
        org.zkoss.xel.XelException
      • getType

        public java.lang.Class<?> getType​(BindContext ctx,
                                          org.zkoss.zk.ui.Component comp,
                                          org.zkoss.xel.ExpressionX expression)
                                   throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Returns the result type of the specified expression.
        Specified by:
        getType in interface BindEvaluatorX
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • getValueReference

        public org.zkoss.xel.ValueReference getValueReference​(BindContext ctx,
                                                              org.zkoss.zk.ui.Component comp,
                                                              org.zkoss.xel.ExpressionX expression)
                                                       throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Returns the result reference of the specified expression.
        Specified by:
        getValueReference in interface BindEvaluatorX
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • newXelContext

        protected org.zkoss.xel.XelContext newXelContext​(BindContext ctx,
                                                         org.zkoss.zk.ui.Component comp)
      • isReadOnly

        public boolean isReadOnly​(BindContext ctx,
                                  org.zkoss.zk.ui.Component comp,
                                  org.zkoss.xel.ExpressionX expression)
                           throws org.zkoss.xel.XelException
        Description copied from interface: BindEvaluatorX
        Returns whether the specified expression a read only expression.
        Specified by:
        isReadOnly in interface BindEvaluatorX
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Returns:
        whether the specified expression a read only expression.
        Throws:
        org.zkoss.xel.XelException