Example usage for org.springframework.context.support PostProcessorRegistrationDelegate invokeBeanFactoryPostProcessors

List of usage examples for org.springframework.context.support PostProcessorRegistrationDelegate invokeBeanFactoryPostProcessors

Introduction

In this page you can find the example usage for org.springframework.context.support PostProcessorRegistrationDelegate invokeBeanFactoryPostProcessors.

Prototype

private static void invokeBeanFactoryPostProcessors(
        Collection<? extends BeanFactoryPostProcessor> postProcessors,
        ConfigurableListableBeanFactory beanFactory) 

Source Link

Document

Invoke the given BeanFactoryPostProcessor beans.

Usage

From source file:org.springframework.context.support.AbstractApplicationContext.java

/**
 * Instantiate and invoke all registered BeanFactoryPostProcessor beans,
 * respecting explicit order if given./*from ww w .  j ava  2  s.com*/
 * <p>Must be called before singleton instantiation.
 */
protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory beanFactory) {
    PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(beanFactory,
            getBeanFactoryPostProcessors());

    // Detect a LoadTimeWeaver and prepare for weaving, if found in the meantime
    // (e.g. through an @Bean method registered by ConfigurationClassPostProcessor)
    if (beanFactory.getTempClassLoader() == null && beanFactory.containsBean(LOAD_TIME_WEAVER_BEAN_NAME)) {
        beanFactory.addBeanPostProcessor(new LoadTimeWeaverAwareProcessor(beanFactory));
        beanFactory.setTempClassLoader(new ContextTypeMatchClassLoader(beanFactory.getBeanClassLoader()));
    }
}