/** * Used to create a context with no BeanFactory, usually in tests. * @return The evaluation context. */ public static StandardEvaluationContext createStandardEvaluationContext() { return (StandardEvaluationContext) doCreateContext(null, false); }
/** * Used to create a context with no BeanFactory, usually in tests. * @return The evaluation context. * @since 4.3.15 */ public static SimpleEvaluationContext createSimpleEvaluationContext() { return (SimpleEvaluationContext) doCreateContext(null, true); }
/** * Obtains the context from the beanFactory if not null; emits a warning if the beanFactory * is null. * @param beanFactory The bean factory. * @return The evaluation context. */ public static StandardEvaluationContext createStandardEvaluationContext(BeanFactory beanFactory) { if (beanFactory == null) { logger.warn("Creating EvaluationContext with no beanFactory", new RuntimeException("No beanFactory")); } return (StandardEvaluationContext) doCreateContext(beanFactory, false); }
/** * Obtains the context from the beanFactory if not null; emits a warning if the beanFactory * is null. * @param beanFactory The bean factory. * @return The evaluation context. * @since 4.3.15 */ public static SimpleEvaluationContext createSimpleEvaluationContext(BeanFactory beanFactory) { if (beanFactory == null) { logger.warn("Creating EvaluationContext with no beanFactory", new RuntimeException("No beanFactory")); } return (SimpleEvaluationContext) doCreateContext(beanFactory, true); }
/** * Used to create a context with no BeanFactory, usually in tests. * @return The evaluation context. */ public static StandardEvaluationContext createStandardEvaluationContext() { return (StandardEvaluationContext) doCreateContext(null, false); }
/** * Used to create a context with no BeanFactory, usually in tests. * @return The evaluation context. * @since 4.3.15 */ public static SimpleEvaluationContext createSimpleEvaluationContext() { return (SimpleEvaluationContext) doCreateContext(null, true); }
/** * Obtains the context from the beanFactory if not null; emits a warning if the beanFactory * is null. * @param beanFactory The bean factory. * @return The evaluation context. */ public static StandardEvaluationContext createStandardEvaluationContext(BeanFactory beanFactory) { if (beanFactory == null) { logger.warn("Creating EvaluationContext with no beanFactory", new RuntimeException("No beanFactory")); } return (StandardEvaluationContext) doCreateContext(beanFactory, false); }
/** * Obtains the context from the beanFactory if not null; emits a warning if the beanFactory * is null. * @param beanFactory The bean factory. * @return The evaluation context. * @since 4.3.15 */ public static SimpleEvaluationContext createSimpleEvaluationContext(BeanFactory beanFactory) { if (beanFactory == null) { logger.warn("Creating EvaluationContext with no beanFactory", new RuntimeException("No beanFactory")); } return (SimpleEvaluationContext) doCreateContext(beanFactory, true); }