Class DefaultExpressionResolver

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.expression.ExpressionParser createExpressionParser()  
      protected EvaluationContextFactory getContextFactory()  
      protected org.springframework.expression.ExpressionParser getExpressionParser()  
      <T> T getValue​(java.lang.Object sourceObject, java.lang.String expression)
      Evaluates provided expression in regards to specified object.
      <T> T getValue​(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,​java.lang.Object> variables)
      Evaluates provided expression in regards to specified object.
      <T> java.lang.Class<T> getValueType​(java.lang.Object sourceObject, java.lang.String expression)
      Evaluates value type provided expression in regards to specified object.
      <T> java.lang.Class<T> getValueType​(java.lang.Object sourceObject, java.lang.String expression, java.util.Map<java.lang.String,​java.lang.Object> variables)
      Evaluates value type provided expression in regards to specified object.
      void setExpressionParser​(org.springframework.expression.ExpressionParser expressionParser)  
      void setValue​(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value)
      Sets the value for the specified expression.
      void setValue​(java.lang.Object sourceObject, java.lang.String expression, java.lang.Object value, java.util.Locale locale)
      Sets the value for the specified expression and locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getExpressionParser

        protected org.springframework.expression.ExpressionParser getExpressionParser()
      • setExpressionParser

        public void setExpressionParser​(org.springframework.expression.ExpressionParser expressionParser)
      • createExpressionParser

        protected org.springframework.expression.ExpressionParser createExpressionParser()
      • getValue

        public <T> T getValue​(java.lang.Object sourceObject,
                              java.lang.String expression)
        Description copied from interface: ExpressionResolver
        Evaluates provided expression in regards to specified object. Current Locale is used during evaluation.
        Specified by:
        getValue in interface ExpressionResolver
        Returns:
        value of evaluation
      • getValue

        public <T> T getValue​(java.lang.Object sourceObject,
                              java.lang.String expression,
                              java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: ExpressionResolver
        Evaluates provided expression in regards to specified object. The returning map holds a locale as key and the value of this map holds the corresponding localized value of the expression.
        Specified by:
        getValue in interface ExpressionResolver
        Parameters:
        sourceObject - object on which evaluation is performed
        expression - given expression
        variables - variables passed to EvaluationContext.setVariable(String, Object)
        Returns:
        value of evaluation
      • setValue

        public void setValue​(java.lang.Object sourceObject,
                             java.lang.String expression,
                             java.lang.Object value)
        Description copied from interface: ExpressionResolver
        Sets the value for the specified expression.
        Specified by:
        setValue in interface ExpressionResolver
      • setValue

        public void setValue​(java.lang.Object sourceObject,
                             java.lang.String expression,
                             java.lang.Object value,
                             java.util.Locale locale)
        Description copied from interface: ExpressionResolver
        Sets the value for the specified expression and locale. Assumes the the object has a setter with a Locale as second argument for the given property.
        Specified by:
        setValue in interface ExpressionResolver
      • getValueType

        public <T> java.lang.Class<T> getValueType​(java.lang.Object sourceObject,
                                                   java.lang.String expression,
                                                   java.util.Map<java.lang.String,​java.lang.Object> variables)
        Description copied from interface: ExpressionResolver
        Evaluates value type provided expression in regards to specified object.
        Specified by:
        getValueType in interface ExpressionResolver
        Parameters:
        sourceObject - object on which evaluation is performed
        expression - given expression
        variables - variables passed to EvaluationContext.setVariable(String, Object)
        Returns:
        value type of evaluation
      • getValueType

        public <T> java.lang.Class<T> getValueType​(java.lang.Object sourceObject,
                                                   java.lang.String expression)
        Description copied from interface: ExpressionResolver
        Evaluates value type provided expression in regards to specified object.
        Specified by:
        getValueType in interface ExpressionResolver
        Parameters:
        sourceObject - object on which evaluation is performed
        expression - given expression
        Returns:
        value type of evaluation