org.springframework.context.index

## 类 CandidateComponentsIndexLoader

- java.lang.Object
- - org.springframework.context.index.CandidateComponentsIndexLoader

-     public class CandidateComponentsIndexLoader
      extends Object

  Candidate components index loading mechanism for internal use within the framework.
  从以下版本开始:
    5.0
  作者:
    Stephane Nicoll

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static String` | `COMPONENTS_RESOURCE_LOCATION` The location to look for components.
    `static String` | `IGNORE_INDEX` System property that instructs Spring to ignore the index, i.e.

  - ### 构造器概要

    构造器
    构造器和说明
    `CandidateComponentsIndexLoader()`

  - ### 方法概要

    所有方法 静态方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static CandidateComponentsIndex` | `loadIndex(ClassLoader classLoader)` Load and instantiate the `CandidateComponentsIndex` from "META-INF/spring.components", using the given class loader.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### COMPONENTS_RESOURCE_LOCATION

          public static final String COMPONENTS_RESOURCE_LOCATION

      The location to look for components.

      Can be present in multiple JAR files.

      另请参阅:
        常量字段值

    - #### IGNORE_INDEX

          public static final String IGNORE_INDEX

      System property that instructs Spring to ignore the index, i.e. to always return `null` from `loadIndex(ClassLoader)`.

      The default is "false", allowing for regular use of the index. Switching this flag to `true` fulfills a corner case scenario when an index is partially available for some libraries (or use cases) but couldn't be built for the whole application. In this case, the application context fallbacks to a regular classpath arrangement (i.e. as no index was present at all).

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### CandidateComponentsIndexLoader

          public CandidateComponentsIndexLoader()

  - ### 方法详细资料

    - #### loadIndex

          @Nullable
          public static CandidateComponentsIndex loadIndex(@Nullable
                                                                      ClassLoader classLoader)

      Load and instantiate the `CandidateComponentsIndex` from "META-INF/spring.components", using the given class loader. If no index is available, return `null`.
      参数:
        `classLoader` - the ClassLoader to use for loading (can be `null` to use the default)
      返回:
        the index to use or `null` if no index was found
      抛出:
        `IllegalArgumentException` - if any module index cannot be loaded or if an error occurs while creating `CandidateComponentsIndex`