Class ProjectClassLoader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ProjectClassLoader
    extends java.net.URLClassLoader
    Classloader with added project-relevant dependencies.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      ProjectClassLoader​(java.net.URLClassLoader classLoader, java.util.List<java.lang.String> classpathElements)
      Create from another classloader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addURL​(java.net.URL url)  
      • Methods inherited from class java.net.URLClassLoader

        close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

        defineClass, defineClass
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProjectClassLoader

        public ProjectClassLoader​(java.net.URLClassLoader classLoader,
                                  java.util.List<java.lang.String> classpathElements)
                           throws java.net.MalformedURLException
        Create from another classloader.
        Parameters:
        classLoader - the task's classloader
        classpathElements - the class path elements from maven
        Throws:
        java.net.MalformedURLException - if malformed classpath element
    • Method Detail

      • addURL

        public void addURL​(java.net.URL url)
        Overrides:
        addURL in class java.net.URLClassLoader