public final class ChildFirstClassLoader extends URLClassLoader
Constructor and Description |
---|
ChildFirstClassLoader(URL[] urls) |
ChildFirstClassLoader(URL[] urls,
ClassLoader parent) |
Modifier and Type | Method and Description |
---|---|
URL |
getResource(String name)
Override the parent-first resource loading model established by
java.lang.Classloader with child-first behavior.
|
Class<?> |
loadClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve)
We override the parent-first behavior established by
java.lang.Classloader.
|
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ChildFirstClassLoader(URL[] urls)
public ChildFirstClassLoader(URL[] urls, ClassLoader parent)
public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
The implementation is surprisingly straightforward.
loadClass
in class ClassLoader
name
- the name of the class to load, should not be null
.resolve
- flag that indicates whether the class should be resolved.null
.ClassNotFoundException
- if the class could not be loaded.public URL getResource(String name)
getResource
in class ClassLoader
name
- the name of the resource to load, should not be
null
.URL
for the resource, or null
if it could
not be found.Copyright © 2006-2012 The Red5 Project