Example usage for org.springframework.beans.factory.support BeanDefinitionRegistry isAlias

List of usage examples for org.springframework.beans.factory.support BeanDefinitionRegistry isAlias

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support BeanDefinitionRegistry isAlias.

Prototype

boolean isAlias(String name);

Source Link

Document

Determine whether this given name is defines as an alias (as opposed to the name of an actually registered component).

Usage

From source file:de.axelfaust.alfresco.hackathon.cmisserver.repo.beans.BeanDefinitionRemovingRegistryPostProcessor.java

@Override
public void postProcessBeanDefinitionRegistry(final BeanDefinitionRegistry registry) throws BeansException {
    for (final String beanName : this.beanNames) {
        if (registry.containsBeanDefinition(beanName)) {
            LOGGER.info("Removing configured bean {}", beanName);
            registry.removeBeanDefinition(beanName);
        } else if (registry.isAlias(beanName)) {
            registry.removeAlias(beanName);
        } else {//  w w  w  .  j a  v  a2  s  .c om
            LOGGER.debug("Bean registry {} does not contain bean definition for {}", registry, beanName);
        }
    }

}