Class BruteLoader

java.lang.Object
ml.karmaconfigs.api.common.karma.loader.BruteLoader

public final class BruteLoader extends Object
Brute source loader This new way of loading sources to the project class path export all the modules to all the modules "ExportAllToAll" using BurningWave utility class. That way, there's no need to create any class loader nor bootstrap
  • Constructor Details

    • BruteLoader

      public BruteLoader(URLClassLoader ucl)
      Initialize the brute loader
      Parameters:
      ucl - the main class loader
  • Method Details

    • downloadAndInject

      public void downloadAndInject(URL downloadURL, NameComponent name)
      Download and then inject the result into the API
      Parameters:
      downloadURL - the source download URL
      name - the source name, use NameComponent.forFile(CharSequence, String, String...)
    • add

      public boolean add(URL source)
      Tries to add the specified source to the application classpath
      Parameters:
      source - the source to add
      Returns:
      if the source could be added
    • add

      public boolean add(File source)
      Tries to add the specified source to the application classpath
      Parameters:
      source - the source to add
      Returns:
      if the source could be added
    • add

      public boolean add(Path source)
      Tries to add the specified source to the application classpath
      Parameters:
      source - the source to add
      Returns:
      if the source could be added
    • getLoader

      public URLClassLoader getLoader()
      Get the used class loader
      Returns:
      the class loader