Class ClientClassLoader

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

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

      Fields 
      Modifier and Type Field Description
      java.lang.String nativePath  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientClassLoader​(java.net.URL[] urls)
      Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader.
      ClientClassLoader​(java.net.URL[] urls, java.lang.ClassLoader parent)
      Constructs a new URLClassLoader for the given URLs.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addURL​(java.net.URL url)  
      java.lang.String findLibrary​(java.lang.String name)  
      java.lang.String getNativeEx()  
      java.lang.String getNativePrefix()  
      • 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, 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
    • Field Detail

      • nativePath

        public java.lang.String nativePath
    • Constructor Detail

      • ClientClassLoader

        public ClientClassLoader​(java.net.URL[] urls)
        Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader. The URLs will be searched in the order specified for classes and resources after first searching in the parent class loader. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

        If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

        Parameters:
        urls - the URLs from which to load classes and resources
        Throws:
        java.lang.SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
        java.lang.NullPointerException - if urls is null.
        See Also:
        SecurityManager.checkCreateClassLoader()
      • ClientClassLoader

        public ClientClassLoader​(java.net.URL[] urls,
                                 java.lang.ClassLoader parent)
        Constructs a new URLClassLoader for the given URLs. The URLs will be searched in the order specified for classes and resources after first searching in the specified parent class loader. Any jar: scheme URL is assumed to refer to a JAR file. Any file: scheme URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be downloaded and opened as needed.

        If there is a security manager, this method first calls the security manager's checkCreateClassLoader method to ensure creation of a class loader is allowed.

        Parameters:
        urls - the URLs from which to load classes and resources
        parent - the parent class loader for delegation
        Throws:
        java.lang.SecurityException - if a security manager exists and its checkCreateClassLoader method doesn't allow creation of a class loader.
        java.lang.NullPointerException - if urls is null.
        See Also:
        SecurityManager.checkCreateClassLoader()
    • Method Detail

      • findLibrary

        public java.lang.String findLibrary​(java.lang.String name)
        Overrides:
        findLibrary in class java.lang.ClassLoader
      • getNativeEx

        public java.lang.String getNativeEx()
      • getNativePrefix

        public java.lang.String getNativePrefix()
      • addURL

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