Class ModuleURLClassLoader

All Implemented Interfaces:
InjectionLayerHolder<dev.derklaro.aerogel.SpecifiedInjector>, Closeable, AutoCloseable

@Internal public class ModuleURLClassLoader extends URLClassLoader implements InjectionLayerHolder<dev.derklaro.aerogel.SpecifiedInjector>
This module url class loader is a unique url class loader for each module. Loading a class using this ClassLoader ensures that all other modules have access to the loaded class too.
Since:
4.0
See Also:
  • Field Details

    • CLASS_LOADING_LOCK

      protected static final Lock CLASS_LOADING_LOCK
      All loaders which were created and of which the associated module is still loaded.
    • LOADERS

      protected static final Set<ModuleURLClassLoader> LOADERS
    • injectionLayer

      protected final InjectionLayer<dev.derklaro.aerogel.SpecifiedInjector> injectionLayer
  • Constructor Details

    • ModuleURLClassLoader

      public ModuleURLClassLoader(@NonNull @NonNull URL moduleFileUrl, @NonNull @NonNull Set<URL> moduleDependencyUrls, @NonNull @NonNull InjectionLayer<dev.derklaro.aerogel.SpecifiedInjector> injectionLayer)
      Creates an instance of this FinalizeURLClassLoader.
      Parameters:
      moduleFileUrl - the module file to which this loader is associated.
      moduleDependencyUrls - all dependencies which were loaded for the module.
      injectionLayer - the injection layer for the module associated with this loader.
      Throws:
      NullPointerException - if moduleFileUrl or moduleDependencyUrls is null.
  • Method Details