public class ChildFirstURLClassLoader extends MutableURLClassLoader
Constructor and Description |
---|
ChildFirstURLClassLoader(java.net.URL[] urls,
ClassLoader parent) |
ChildFirstURLClassLoader(java.net.URL[] urls,
ClassLoader parent,
ClassLoader grandparent)
Specify the grandparent if there is a need to load in the order of
`grandparent -> urls (child) -> parent`.
|
Modifier and Type | Method and Description |
---|---|
java.net.URL |
getResource(String name) |
java.util.Enumeration<java.net.URL> |
getResources(String name) |
Class<?> |
loadClass(String name,
boolean resolve) |
addURL
close, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
public ChildFirstURLClassLoader(java.net.URL[] urls, ClassLoader parent)
public ChildFirstURLClassLoader(java.net.URL[] urls, ClassLoader parent, ClassLoader grandparent)
public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public java.util.Enumeration<java.net.URL> getResources(String name) throws java.io.IOException
getResources
in class ClassLoader
java.io.IOException
public java.net.URL getResource(String name)
getResource
in class ClassLoader