Package org.apache.spark.util
Class ChildFirstURLClassLoader
Object
ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.spark.util.MutableURLClassLoader
org.apache.spark.util.ChildFirstURLClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
A mutable class loader that gives preference to its own URLs over the parent class loader
when loading classes and resources.
-
Constructor Summary
ConstructorDescriptionChildFirstURLClassLoader
(URL[] urls, ClassLoader parent) ChildFirstURLClassLoader
(URL[] urls, ClassLoader parent, ClassLoader grandparent) Specify the grandparent if there is a need to load in the order of `grandparent -> urls (child) -> parent`. -
Method Summary
Methods inherited from class org.apache.spark.util.MutableURLClassLoader
addURL
Methods inherited from class java.net.URLClassLoader
close, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
-
Constructor Details
-
ChildFirstURLClassLoader
-
ChildFirstURLClassLoader
Specify the grandparent if there is a need to load in the order of `grandparent -> urls (child) -> parent`.
-
-
Method Details
-
loadClass
- Throws:
ClassNotFoundException
-
getResources
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
getResource
- Overrides:
getResource
in classClassLoader
-