Class PostDelegationClassLoader

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

    public class PostDelegationClassLoader
    extends java.net.URLClassLoader
    This custom implementation of a ClassLoader enables deferred execution-time loading of a particular version of class hierarchy from one of many embedded the cassandra-all library JARs. It first attempts to load any requested class from the extracted JAR, and resorts to using the parent class loader when the the class is not there. This behavior is opposite to the one of standard URLClassLoader, which invokes its parent class loader first.
    • Constructor Summary

      Constructors 
      Constructor Description
      PostDelegationClassLoader​(java.net.URL[] urls, java.lang.ClassLoader parent)  
    • Method Summary

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

        addURL, 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, 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

      • PostDelegationClassLoader

        public PostDelegationClassLoader​(@NotNull
                                         java.net.URL[] urls,
                                         @Nullable
                                         java.lang.ClassLoader parent)
    • Method Detail

      • loadClass

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