Save This Page
Home » spring-framework-2.5.4 » org.springframework » beans » factory » support » [javadoc | source]
org.springframework.beans.factory.support
public interface: BeanDefinitionRegistry [javadoc | source]

All Implemented Interfaces:
    AliasRegistry

All Known Implementing Classes:
    GenericWebApplicationContext, GenericApplicationContext, StaticApplicationContext, DefaultListableBeanFactory, ResourceAdapterApplicationContext, XmlBeanFactory, StaticWebApplicationContext, SimpleBeanDefinitionRegistry, StaticPortletApplicationContext

Interface for registries that hold bean definitions, for example RootBeanDefinition and ChildBeanDefinition instances. Typically implemented by BeanFactories that internally work with the AbstractBeanDefinition hierarchy.

This is the only interface in Spring's bean factory packages that encapsulates registration of bean definitions. The standard BeanFactory interfaces only cover access to a fully configured factory instance.

Spring's bean definition readers expect to work on an implementation of this interface. Known implementors within the Spring core are DefaultListableBeanFactory and GenericApplicationContext.

Method from org.springframework.beans.factory.support.BeanDefinitionRegistry Summary:
containsBeanDefinition,   getBeanDefinition,   getBeanDefinitionCount,   getBeanDefinitionNames,   isBeanNameInUse,   registerBeanDefinition,   removeBeanDefinition
Method from org.springframework.beans.factory.support.BeanDefinitionRegistry Detail:
 public boolean containsBeanDefinition(String beanName)
    Check if this registry contains a bean definition with the given name.
 public BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException
    Return the BeanDefinition for the given bean name.
 public int getBeanDefinitionCount()
    Return the number of beans defined in the registry.
 public String[] getBeanDefinitionNames()
    Return the names of all beans defined in this registry.
 public boolean isBeanNameInUse(String beanName)
    Determine whether the given bean name is already in use within this registry, i.e. whether there is a local bean or alias registered under this name.
 public  void registerBeanDefinition(String beanName,
    BeanDefinition beanDefinition) throws BeanDefinitionStoreException
    Register a new bean definition with this registry. Must support RootBeanDefinition and ChildBeanDefinition.
 public  void removeBeanDefinition(String beanName) throws NoSuchBeanDefinitionException
    Remove the BeanDefinition for the given name.