spring-framework / org.springframework.context.index / CandidateComponentsIndexLoader / loadIndex

loadIndex

@Nullable open static fun loadIndex(@Nullable classLoader: ClassLoader): CandidateComponentsIndex

Load and instantiate the CandidateComponentsIndex from {@value #COMPONENTS_RESOURCE_LOCATION}, using the given class loader. If no index is available, return null.

Parameters

classLoader - the ClassLoader to use for loading (can be null to use the default)

Exceptions

IllegalArgumentException - if any module index cannot be loaded or if an error occurs while creating CandidateComponentsIndex

Return
the index to use or null if no index was found