Class ImportCandidates
java.lang.Object
org.springframework.boot.context.annotation.ImportCandidates
Contains
@Configuration
import candidates, usually auto-configurations.
The load(Class, ClassLoader)
method can be used to discover the import
candidates.- Since:
- 2.7.0
- Author:
- Moritz Halbritter, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of loaded import candidates.iterator()
static ImportCandidates
load
(Class<?> annotation, ClassLoader classLoader) Loads the names of import candidates from the classpath.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
-
getCandidates
Returns the list of loaded import candidates.- Returns:
- the list of import candidates
-
load
Loads the names of import candidates from the classpath. The names of the import candidates are stored in files namedMETA-INF/spring/full-qualified-annotation-name.imports
on the classpath. Every line contains the full qualified name of the candidate class. Comments are supported using the # character.- Parameters:
annotation
- annotation to loadclassLoader
- class loader to use for loading- Returns:
- list of names of annotated classes
-