Example usage for org.springframework.beans.factory.config ConfigurableListableBeanFactory isSingleton

List of usage examples for org.springframework.beans.factory.config ConfigurableListableBeanFactory isSingleton

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config ConfigurableListableBeanFactory isSingleton.

Prototype

boolean isSingleton(String name) throws NoSuchBeanDefinitionException;

Source Link

Document

Is this bean a shared singleton?

Usage

From source file:org.openspaces.core.context.GigaSpaceLateContextBeanFactoryPostProcessor.java

public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    String[] beanNames = beanFactory.getBeanDefinitionNames();
    for (String beanName : beanNames) {
        if (!beanFactory.isSingleton(beanName)) {
            continue;
        }/*from  w w  w .  j  a v a  2s .com*/
        List<AnnotatedMember> metadata = findClassMetadata(beanFactory.getType(beanName));
        if (metadata.isEmpty()) {
            continue;
        }
        Object bean = beanFactory.getBean(beanName);
        for (AnnotatedMember member : metadata) {
            member.inject(bean);
        }
    }
}