## 接口的使用
org.springframework.beans.factory.ListableBeanFactory

- 使用ListableBeanFactory的程序包
  程序包 | 说明
  --- | ---
  org.springframework.beans.factory | The core package implementing Spring's lightweight Inversion of Control (IoC) container.
  org.springframework.beans.factory.config | SPI interfaces and configuration-related convenience classes for bean factories.
  org.springframework.beans.factory.support | Classes supporting the `org.springframework.beans.factory` package.
  org.springframework.beans.factory.xml | Contains an abstract XML-based `BeanFactory` implementation, including a standard "spring-beans" XSD.

- - ### org.springframework.beans.factory中ListableBeanFactory的使用

    参数类型为ListableBeanFactory的org.springframework.beans.factory中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `static String[]` | BeanFactoryUtils.`beanNamesForAnnotationIncludingAncestors(ListableBeanFactory lbf, Class<? extends Annotation> annotationType)` Get all bean names whose `Class` has the supplied `Annotation` type, including those defined in ancestor factories, without creating any bean instances yet.
    `static String[]` | BeanFactoryUtils.`beanNamesForTypeIncludingAncestors(ListableBeanFactory lbf, Class<?> type)` Get all bean names for the given type, including those defined in ancestor factories.
    `static String[]` | BeanFactoryUtils.`beanNamesForTypeIncludingAncestors(ListableBeanFactory lbf, Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)` Get all bean names for the given type, including those defined in ancestor factories.
    `static String[]` | BeanFactoryUtils.`beanNamesForTypeIncludingAncestors(ListableBeanFactory lbf, org.springframework.core.ResolvableType type)` Get all bean names for the given type, including those defined in ancestor factories.
    `static String[]` | BeanFactoryUtils.`beanNamesIncludingAncestors(ListableBeanFactory lbf)` Return all bean names in the factory, including ancestor factories.
    `static <T> T` | BeanFactoryUtils.`beanOfType(ListableBeanFactory lbf, Class<T> type)` Return a single bean of the given type or subtypes, not looking in ancestor factories.
    `static <T> T` | BeanFactoryUtils.`beanOfType(ListableBeanFactory lbf, Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)` Return a single bean of the given type or subtypes, not looking in ancestor factories.
    `static <T> T` | BeanFactoryUtils.`beanOfTypeIncludingAncestors(ListableBeanFactory lbf, Class<T> type)` Return a single bean of the given type or subtypes, also picking up beans defined in ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
    `static <T> T` | BeanFactoryUtils.`beanOfTypeIncludingAncestors(ListableBeanFactory lbf, Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)` Return a single bean of the given type or subtypes, also picking up beans defined in ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
    `static <T> Map<String,T>` | BeanFactoryUtils.`beansOfTypeIncludingAncestors(ListableBeanFactory lbf, Class<T> type)` Return all beans of the given type or subtypes, also picking up beans defined in ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
    `static <T> Map<String,T>` | BeanFactoryUtils.`beansOfTypeIncludingAncestors(ListableBeanFactory lbf, Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)` Return all beans of the given type or subtypes, also picking up beans defined in ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
    `static int` | BeanFactoryUtils.`countBeansIncludingAncestors(ListableBeanFactory lbf)` Count all beans in any hierarchy in which this factory participates.

  - ### org.springframework.beans.factory.config中ListableBeanFactory的使用

    org.springframework.beans.factory.config中ListableBeanFactory的子接口
    限定符和类型 | 接口和说明
    --- | ---
    `interface` | `ConfigurableListableBeanFactory` Configuration interface to be implemented by most listable bean factories.

  - ### org.springframework.beans.factory.support中ListableBeanFactory的使用

    实现ListableBeanFactory的org.springframework.beans.factory.support中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `DefaultListableBeanFactory` Spring's default implementation of the `ConfigurableListableBeanFactory` and `BeanDefinitionRegistry` interfaces: a full-fledged bean factory based on bean definition metadata, extensible through post-processors.
    `class` | `StaticListableBeanFactory` Static `BeanFactory` implementation which allows to register existing singleton instances programmatically.

  - ### org.springframework.beans.factory.xml中ListableBeanFactory的使用

    实现ListableBeanFactory的org.springframework.beans.factory.xml中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `XmlBeanFactory` 已过时。 as of Spring 3.1 in favor of `DefaultListableBeanFactory` and `XmlBeanDefinitionReader`