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 Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.springframework.expression.ExpressionParserprotected final org.springframework.core.log.LogAccessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidprotected ObjectevaluateExpression(String expression, Object input) protected <T> TevaluateExpression(String expression, Object input, Class<T> expectedType) protected ObjectevaluateExpression(org.springframework.expression.Expression expression) protected <T> TevaluateExpression(org.springframework.expression.Expression expression, Class<T> expectedType) protected ObjectevaluateExpression(org.springframework.expression.Expression expression, Object input) protected <T> TevaluateExpression(org.springframework.expression.Expression expression, Object input, Class<T> expectedType) protected <T> TevaluateExpression(org.springframework.expression.Expression expression, org.springframework.messaging.Message<?> message, Class<T> expectedType) protected org.springframework.beans.factory.BeanFactoryprotected org.springframework.expression.spel.support.StandardEvaluationContextprotected final org.springframework.expression.spel.support.StandardEvaluationContextgetEvaluationContext(boolean beanFactoryRequired) Emits a WARN log if the beanFactory field is null, unless the argument is false.protected MessageBuilderFactoryprotected voidonInit()voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Specify a BeanFactory in order to enable resolution via@beanNamein the expression.voidsetConversionService(org.springframework.core.convert.ConversionService conversionService)
-
Field Details
-
logger
protected final org.springframework.core.log.LogAccessor logger -
EXPRESSION_PARSER
protected static final org.springframework.expression.ExpressionParser EXPRESSION_PARSER
-
-
Constructor Details
-
AbstractExpressionEvaluator
public AbstractExpressionEvaluator()
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Specify a BeanFactory in order to enable resolution via@beanNamein the expression.- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory getBeanFactory() -
setConversionService
public void setConversionService(org.springframework.core.convert.ConversionService conversionService) -
getMessageBuilderFactory
-
afterPropertiesSet
public final void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.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 Class<T> expectedType) -
evaluateExpression
-
evaluateExpression
-
evaluateExpression
-
evaluateExpression
@Nullable protected <T> T evaluateExpression(org.springframework.expression.Expression expression, @Nullable Class<T> expectedType) -
evaluateExpression
-
evaluateExpression
-
onInit
protected void onInit()
-