Interface LocalLoader

  • All Known Subinterfaces:
    IterableLocalLoader
    All Known Implementing Classes:
    AbstractLocalLoader

    public interface LocalLoader
    A loader which implements the local part of a module.

    Thread safety warning! The loader must never call into a class loader (or any other object) which may take locks and subsequently delegate to a module class loader. This will cause deadlocks and other hard-to-debug concurrency problems.

    Author:
    David M. Lloyd
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Class<?> loadClassLocal​(java.lang.String name, boolean resolve)
      Load a class which is locally defined by this loader.
      java.lang.Package loadPackageLocal​(java.lang.String name)
      Load a package which is locally defined by this loader.
      java.util.List<Resource> loadResourceLocal​(java.lang.String name)
      Load a resource which is locally defined by this loader.
    • Method Detail

      • loadClassLocal

        java.lang.Class<?> loadClassLocal​(java.lang.String name,
                                          boolean resolve)
        Load a class which is locally defined by this loader.
        Parameters:
        name - the class name
        resolve - true to resolve the class
        Returns:
        the class, or null if there is no local class with this name
      • loadPackageLocal

        java.lang.Package loadPackageLocal​(java.lang.String name)
        Load a package which is locally defined by this loader.
        Parameters:
        name - the package name
        Returns:
        the package, or null if there is no local package with this name
      • loadResourceLocal

        java.util.List<Resource> loadResourceLocal​(java.lang.String name)
        Load a resource which is locally defined by this loader. The given name is a path separated by "/" characters.
        Parameters:
        name - the resource path
        Returns:
        the resource or resources, or an empty list if there is no local resource with this name