org.springframework.beans.factory.support

Interface BeanDefinitionRegistry

    • Method Detail

      • removeBeanDefinition

        void removeBeanDefinition(java.lang.String beanName)
                           throws NoSuchBeanDefinitionException
        Remove the BeanDefinition for the given name.
        Parameters:
        beanName - the name of the bean instance to register
        Throws:
        NoSuchBeanDefinitionException - if there is no such bean definition
      • getBeanDefinition

        BeanDefinition getBeanDefinition(java.lang.String beanName)
                                  throws NoSuchBeanDefinitionException
        Return the BeanDefinition for the given bean name.
        Parameters:
        beanName - name of the bean to find a definition for
        Returns:
        the BeanDefinition for the given name (never null)
        Throws:
        NoSuchBeanDefinitionException - if there is no such bean definition
      • containsBeanDefinition

        boolean containsBeanDefinition(java.lang.String beanName)
        Check if this registry contains a bean definition with the given name.
        Parameters:
        beanName - the name of the bean to look for
        Returns:
        if this registry contains a bean definition with the given name
      • getBeanDefinitionNames

        java.lang.String[] getBeanDefinitionNames()
        Return the names of all beans defined in this registry.
        Returns:
        the names of all beans defined in this registry, or an empty array if none defined
      • getBeanDefinitionCount

        int getBeanDefinitionCount()
        Return the number of beans defined in the registry.
        Returns:
        the number of beans defined in the registry
      • isBeanNameInUse

        boolean isBeanNameInUse(java.lang.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.
        Parameters:
        beanName - the name to check
        Returns:
        whether the given bean name is already in use