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
Modifier and TypeFieldDescriptionprotected static final ExpressionParser
protected final LogAccessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
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
protected StandardEvaluationContext
protected final StandardEvaluationContext
getEvaluationContext
(boolean beanFactoryRequired) Emits a WARN log if the beanFactory field is null, unless the argument is false.protected MessageBuilderFactory
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
-
logger
-
EXPRESSION_PARSER
-
-
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()
-