Class AbstractExpressionEvaluator

java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AbstractMessageProcessor, AbstractMessageSource, CollectionArgumentResolver, ExpressionEvaluatingMessageListProcessor, ExpressionEvaluatingReleaseStrategy, MapArgumentResolver, MessagingMethodInvokerHelper, MethodInvokingMessageListProcessor, PayloadExpressionArgumentResolver, PayloadsArgumentResolver

public abstract class AbstractExpressionEvaluator
extends java.lang.Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
Since:
2.0
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected static org.springframework.expression.ExpressionParser EXPRESSION_PARSER  
    protected org.springframework.core.log.LogAccessor logger  
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractExpressionEvaluator()  
  • Method Summary

    Modifier and Type Method Description
    void afterPropertiesSet()  
    protected java.lang.Object evaluateExpression​(java.lang.String expression, java.lang.Object input)  
    protected <T> T evaluateExpression​(java.lang.String expression, java.lang.Object input, java.lang.Class<T> expectedType)  
    protected java.lang.Object evaluateExpression​(org.springframework.expression.Expression expression)  
    protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, java.lang.Class<T> expectedType)  
    protected java.lang.Object evaluateExpression​(org.springframework.expression.Expression expression, java.lang.Object input)  
    protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, java.lang.Object input, java.lang.Class<T> expectedType)  
    protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, org.springframework.messaging.Message<?> message, java.lang.Class<T> expectedType)  
    protected org.springframework.beans.factory.BeanFactory getBeanFactory()  
    protected org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext()  
    protected org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext​(boolean beanFactoryRequired)
    Emits a WARN log if the beanFactory field is null, unless the argument is false.
    protected MessageBuilderFactory getMessageBuilderFactory()  
    protected void onInit()  
    void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
    Specify a BeanFactory in order to enable resolution via @beanName in the expression.
    void setConversionService​(org.springframework.core.convert.ConversionService conversionService)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected final org.springframework.core.log.LogAccessor logger
    • EXPRESSION_PARSER

      protected static final org.springframework.expression.ExpressionParser EXPRESSION_PARSER
  • Constructor Details

  • Method Details

    • setBeanFactory

      public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
      Specify a BeanFactory in order to enable resolution via @beanName in the expression.
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
    • getBeanFactory

      protected org.springframework.beans.factory.BeanFactory getBeanFactory()
    • setConversionService

      public void setConversionService​(org.springframework.core.convert.ConversionService conversionService)
    • getMessageBuilderFactory

      protected MessageBuilderFactory getMessageBuilderFactory()
    • afterPropertiesSet

      public final void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getEvaluationContext

      protected org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext()
    • getEvaluationContext

      protected final org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext​(boolean beanFactoryRequired)
      Emits a WARN log if the beanFactory field is null, unless the argument is false.
      Parameters:
      beanFactoryRequired - set to false to suppress the warning.
      Returns:
      The evaluation context.
    • evaluateExpression

      @Nullable protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, org.springframework.messaging.Message<?> message, @Nullable java.lang.Class<T> expectedType)
    • evaluateExpression

      @Nullable protected java.lang.Object evaluateExpression​(java.lang.String expression, java.lang.Object input)
    • evaluateExpression

      @Nullable protected <T> T evaluateExpression​(java.lang.String expression, java.lang.Object input, @Nullable java.lang.Class<T> expectedType)
    • evaluateExpression

      @Nullable protected java.lang.Object evaluateExpression​(org.springframework.expression.Expression expression, java.lang.Object input)
    • evaluateExpression

      @Nullable protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, @Nullable java.lang.Class<T> expectedType)
    • evaluateExpression

      @Nullable protected java.lang.Object evaluateExpression​(org.springframework.expression.Expression expression)
    • evaluateExpression

      @Nullable protected <T> T evaluateExpression​(org.springframework.expression.Expression expression, java.lang.Object input, @Nullable java.lang.Class<T> expectedType)
    • onInit

      protected void onInit()