// we cannot continue without a ConfigurableBeanFactory
if (beanFactory == null) {
throw new IllegalStateException("Unable to find a ConfigurableBeanFactory");
}
BeanExpressionContext beanEvaluationContext = new BeanExpressionContext(beanFactory, null);
StandardEvaluationContext sec = new StandardEvaluationContext();
sec.setRootObject(beanEvaluationContext);
sec.addPropertyAccessor(new BeanExpressionContextAccessor());
sec.addPropertyAccessor(new BeanFactoryAccessor());
sec.addPropertyAccessor(new MapAccessor());
sec.setBeanResolver(new BeanFactoryResolver(beanEvaluationContext.getBeanFactory()));
sec.setTypeLocator(new StandardTypeLocator(beanEvaluationContext.getBeanFactory().getBeanClassLoader()));
ConversionService conversionService = beanEvaluationContext.getBeanFactory().getConversionService();
if (conversionService != null) {
sec.setTypeConverter(new StandardTypeConverter(conversionService));
}
_evaluationContext = sec;