Class ElementClassLoader

java.lang.Object
java.lang.ClassLoader
dev.getelements.elements.sdk.spi.ElementClassLoader

public class ElementClassLoader extends ClassLoader
A ClassLoader type which inspects classes at load time processing the visibility annotations provided by the Elements' SDK. Such annotations include ElementPrivate and ElementPublic. This implementation allows for a separate hierarchy of classes to be loaded for each Element, while still allowing some parts of the core system through. The delegate ClassLoader is typically the system class loader.
  • Constructor Details

    • ElementClassLoader

      public ElementClassLoader(ClassLoader delegate)
      Creates a new instance of ElementClassLoader with the specified delegate class loader. The delegate loader will be the sources for classes that are not found in this class loader. This is typically the system class path and the Element's class path. This constructor uses the bootstrap as the parent class loader.
      Parameters:
      delegate - the delegate class loader to use for loading classes that are not found in this class loader.
    • ElementClassLoader

      public ElementClassLoader(ClassLoader delegate, ClassLoader parent)
      Creates a new instance of ElementClassLoader with the specified delegate class loader. The delegate loader will be the sources for classes that are not found in this class loader. This is typically the system class path and the Element's class path.
      Parameters:
      delegate - the delegate class loader to use for loading classes that are not found in this class loader.
      parent - the parent class loader to use for loading classes that are not found in this class loader.
  • Method Details