public void setConversionService(ConversionService conversionService) { if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } }
@Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { ConversionService conversionService = IntegrationUtils.getConversionService(beanFactory); if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } }
/** * Emits a WARN log if the beanFactory field is null, unless the argument is false. * @param beanFactoryRequired set to false to suppress the warning. * @return The evaluation context. */ protected final StandardEvaluationContext getEvaluationContext(boolean beanFactoryRequired) { if (this.evaluationContext == null) { if (this.beanFactory == null && !beanFactoryRequired) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(); } else { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.beanFactory); } this.evaluationContext.setTypeConverter(this.typeConverter); if (this.beanFactory != null) { ConversionService conversionService = IntegrationUtils.getConversionService(this.beanFactory); if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } } } return this.evaluationContext; }
public void setConversionService(ConversionService conversionService) { if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } }
/** * Emits a WARN log if the beanFactory field is null, unless the argument is false. * @param beanFactoryRequired set to false to suppress the warning. * @return The evaluation context. */ protected final StandardEvaluationContext getEvaluationContext(boolean beanFactoryRequired) { if (this.evaluationContext == null) { if (this.beanFactory == null && !beanFactoryRequired) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(); } else { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.beanFactory); } this.evaluationContext.setTypeConverter(this.typeConverter); if (this.beanFactory != null) { ConversionService conversionService = IntegrationUtils.getConversionService(this.beanFactory); if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } } } return this.evaluationContext; }