org.springframework.context.annotation

## 接口 ConditionContext

-     public interface ConditionContext

  Context information for use by `Condition`s.
  从以下版本开始:
    4.0
  作者:
    Phillip Webb, Juergen Hoeller

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `org.springframework.beans.factory.config.ConfigurableListableBeanFactory` | `getBeanFactory()` Return the `ConfigurableListableBeanFactory` that will hold the bean definition should the condition match, or `null` if the bean factory is not available (or not downcastable to `ConfigurableListableBeanFactory`).
    `ClassLoader` | `getClassLoader()` Return the `ClassLoader` that should be used to load additional classes (only `null` if even the system ClassLoader isn't accessible).
    `org.springframework.core.env.Environment` | `getEnvironment()` Return the `Environment` for which the current application is running.
    `org.springframework.beans.factory.support.BeanDefinitionRegistry` | `getRegistry()` Return the `BeanDefinitionRegistry` that will hold the bean definition should the condition match.
    `org.springframework.core.io.ResourceLoader` | `getResourceLoader()` Return the `ResourceLoader` currently being used.

- - ### 方法详细资料

    - #### getRegistry

          org.springframework.beans.factory.support.BeanDefinitionRegistry getRegistry()

      Return the `BeanDefinitionRegistry` that will hold the bean definition should the condition match.
      抛出:
        `IllegalStateException` - if no registry is available (which is unusual: only the case with a plain `ClassPathScanningCandidateComponentProvider`)

    - #### getBeanFactory

          @Nullable
          org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()

      Return the `ConfigurableListableBeanFactory` that will hold the bean definition should the condition match, or `null` if the bean factory is not available (or not downcastable to `ConfigurableListableBeanFactory`).

    - #### getEnvironment

          org.springframework.core.env.Environment getEnvironment()

      Return the `Environment` for which the current application is running.

    - #### getResourceLoader

          org.springframework.core.io.ResourceLoader getResourceLoader()

      Return the `ResourceLoader` currently being used.

    - #### getClassLoader

          @Nullable
          ClassLoader getClassLoader()

      Return the `ClassLoader` that should be used to load additional classes (only `null` if even the system ClassLoader isn't accessible).
      另请参阅:
        `ClassUtils.forName(String, ClassLoader)`