Class AbstractExpressionEvaluator
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,InitializingBean
- Direct Known Subclasses:
AbstractMessageProcessor
,AbstractMessageSource
,CollectionArgumentResolver
,DefaultFileNameGenerator
,ExpressionEvaluatingMessageListProcessor
,ExpressionEvaluatingReleaseStrategy
,ExpressionEvaluatingSqlParameterSourceFactory
,MapArgumentResolver
,MessagingMethodInvokerHelper
,MethodInvokingMessageListProcessor
,PayloadExpressionArgumentResolver
,PayloadsArgumentResolver
public abstract class AbstractExpressionEvaluator extends Object implements BeanFactoryAware, InitializingBean
- Since:
- 2.0
- Author:
- Mark Fisher, Dave Syer, Oleg Zhurakousky, Artem Bilan, Gary Russell
-
Field Summary
Fields Modifier and Type Field Description protected static ExpressionParser
EXPRESSION_PARSER
protected LogAccessor
logger
-
Constructor Summary
Constructors Constructor Description AbstractExpressionEvaluator()
-
Method Summary
Modifier and Type Method Description void
afterPropertiesSet()
protected Object
evaluateExpression(String expression, Object input)
protected <T> T
evaluateExpression(String expression, Object input, Class<T> expectedType)
protected Object
evaluateExpression(Expression expression)
protected <T> T
evaluateExpression(Expression expression, Class<T> expectedType)
protected Object
evaluateExpression(Expression expression, Object input)
protected <T> T
evaluateExpression(Expression expression, Object input, Class<T> expectedType)
protected <T> T
evaluateExpression(Expression expression, Message<?> message, Class<T> expectedType)
protected BeanFactory
getBeanFactory()
protected StandardEvaluationContext
getEvaluationContext()
protected 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(BeanFactory beanFactory)
Specify a BeanFactory in order to enable resolution via@beanName
in the expression.void
setConversionService(ConversionService conversionService)
-
Field Details
-
Constructor Details
-
AbstractExpressionEvaluator
public AbstractExpressionEvaluator()
-
-
Method Details
-
setBeanFactory
Specify a BeanFactory in order to enable resolution via@beanName
in the expression.- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
-
getBeanFactory
-
setConversionService
-
getMessageBuilderFactory
-
afterPropertiesSet
public final void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
getEvaluationContext
-
getEvaluationContext
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(Expression expression, Message<?> message, @Nullable Class<T> expectedType) -
evaluateExpression
-
evaluateExpression
-
evaluateExpression
-
evaluateExpression
@Nullable protected <T> T evaluateExpression(Expression expression, @Nullable Class<T> expectedType) -
evaluateExpression
-
evaluateExpression
@Nullable protected <T> T evaluateExpression(Expression expression, Object input, @Nullable Class<T> expectedType) -
onInit
protected void onInit()
-