Class OSGILauncher.ChildFirstURLClassLoader

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

    protected static class OSGILauncher.ChildFirstURLClassLoader
    extends URLClassLoader
    The ChildFirstURLClassLoader alters regular ClassLoader delegation and will check the URLs used in its initialization for matching classes before delegating to it's parent. Sometimes also referred to as a ParentLastClassLoader
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.URL getResource​(java.lang.String name)  
      protected java.lang.Class<?> loadClass​(java.lang.String name, boolean resolve)  
      • Methods inherited from class java.net.URLClassLoader

        definePackage, getPermissions, getResourceAsStream, newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

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

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

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

      • ChildFirstURLClassLoader

        public ChildFirstURLClassLoader​(java.net.URL[] urls)
      • ChildFirstURLClassLoader

        public ChildFirstURLClassLoader​(java.net.URL[] urls,
                                        java.lang.ClassLoader parent)
    • Method Detail

      • getResource

        public java.net.URL getResource​(java.lang.String name)
        Overrides:
        getResource in class java.lang.ClassLoader
      • loadClass

        protected java.lang.Class<?> loadClass​(java.lang.String name,
                                               boolean resolve)
                                        throws java.lang.ClassNotFoundException
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException