类 ImportCandidates

java.lang.Object
org.springframework.boot.context.annotation.ImportCandidates
所有已实现的接口:
Iterable<String>

public final class ImportCandidates extends Object implements Iterable<String>
Contains @Configuration import candidates, usually auto-configurations. The load(Class, ClassLoader) method can be used to discover the import candidates.
从以下版本开始:
2.7.0
作者:
Moritz Halbritter, Scott Frederick
  • 方法详细资料

    • iterator

      public Iterator<String> iterator()
      指定者:
      iterator 在接口中 Iterable<String>
    • getCandidates

      public List<String> getCandidates()
      Returns the list of loaded import candidates.
      返回:
      the list of import candidates
    • load

      public static ImportCandidates load(Class<?> annotation, ClassLoader classLoader)
      Loads the names of import candidates from the classpath. The names of the import candidates are stored in files named META-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.
      参数:
      annotation - annotation to load
      classLoader - class loader to use for loading
      返回:
      list of names of annotated classes