Class PluginImportCandidates

java.lang.Object
eu.rarogsoftware.rarog.platform.plugins.autoconfigure.PluginImportCandidates

public final class PluginImportCandidates extends Object
Contains @Configuration import candidates, usually auto-configurations. The load(Class, ClassLoader) method can be used to discover the import candidates.

This class is based on ImportCandidates from spring boot, but it adjusted to work with Rarog plugins.

  • Method Details

    • load

      public static List<String> 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/rarog/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 load
      classLoader - class loader to use for loading
      Returns:
      list of names of annotated classes