ch.qos.cal10n.plugins
Class ThisFirstClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
ch.qos.cal10n.plugins.ThisFirstClassLoader
public class ThisFirstClassLoader
- extends URLClassLoader
An almost trivial no fuss implementation of a class loader following the
child-first delegation model.
- Author:
- Ceki Gülcü
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThisFirstClassLoader
public ThisFirstClassLoader(URL[] urls)
ThisFirstClassLoader
public ThisFirstClassLoader(URL[] urls,
ClassLoader parent)
addURL
public void addURL(URL url)
- Overrides:
addURL
in class URLClassLoader
loadClass
public Class<?> loadClass(String name)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
loadClass
protected Class<?> loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- We override the parent-first behavior established by java.lang.Classloader.
The implementation is surprisingly straightforward.
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
Copyright © 2009-2013 QOS.ch. All Rights Reserved.