Class ChangeableURLClassLoader

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

    public class ChangeableURLClassLoader
    extends java.net.URLClassLoader
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<java.net.URL> urls
      The url list.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addURL​(java.net.URL url)
      Add a url.
      java.net.URL[] getURLs()
      Get the urls.
      void removeURL​(java.net.URL url)
      Remove a url.
      java.lang.String toString()  
      • Methods inherited from class java.net.URLClassLoader

        close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, 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, wait, wait, wait
    • Field Detail

      • urls

        protected java.util.List<java.net.URL> urls
        The url list.
    • Constructor Detail

      • ChangeableURLClassLoader

        public ChangeableURLClassLoader​(java.net.URL[] urls)
        Create a new classloader.
      • ChangeableURLClassLoader

        public ChangeableURLClassLoader​(java.net.URL[] urls,
                                        java.lang.ClassLoader parent)
        Create a new classloader.
    • Method Detail

      • addURL

        public void addURL​(java.net.URL url)
        Add a url.
        Overrides:
        addURL in class java.net.URLClassLoader
        Parameters:
        url - The url.
      • removeURL

        public void removeURL​(java.net.URL url)
        Remove a url.
        Parameters:
        url - The url.
      • getURLs

        public java.net.URL[] getURLs()
        Get the urls.
        Overrides:
        getURLs in class java.net.URLClassLoader
        Returns:
        The urls.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object