com.atlassian.plugin.util
Class ChainingClassLoader
java.lang.Object
   java.lang.ClassLoader
java.lang.ClassLoader
       com.atlassian.plugin.util.ChainingClassLoader
com.atlassian.plugin.util.ChainingClassLoader
- public class ChainingClassLoader 
- extends ClassLoader
A class loader that delegates to a list of class loaders. The order is important as classes and resources will be
 loaded from the first classloader that can load them.  This class is optimized for a small number of classloaders.
- Since:
- 2.6.0
 
 
| Methods inherited from class java.lang.ClassLoader | 
| defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setSigners | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ChainingClassLoader
public ChainingClassLoader(ClassLoader... classLoaders)
- Constructs a chaining classloader
 
- Parameters:
- classLoaders- The classloaders to delegate to, in order
 
ChainingClassLoader
public ChainingClassLoader(Map<String,String> resourceRedirects,
                           ClassLoader... classLoaders)
- Constructs a classloader that overrides certain resources
 
- Parameters:
- resourceRedirects- The map of resources to redirect
- classLoaders- The classloaders to delegate to, in order
 
loadClass
public Class loadClass(String name)
                throws ClassNotFoundException
- 
- Overrides:
- loadClassin class- ClassLoader
 
- 
- Throws:
- ClassNotFoundException
 
getResources
public Enumeration<URL> getResources(String name)
                              throws IOException
- 
- Overrides:
- getResourcesin class- ClassLoader
 
- 
- Throws:
- IOException
 
getResource
public URL getResource(String name)
- 
- Overrides:
- getResourcein class- ClassLoader
 
- 
 
getResourceAsStream
public InputStream getResourceAsStream(String name)
- 
- Overrides:
- getResourceAsStreamin class- ClassLoader
 
- 
 
setDefaultAssertionStatus
public void setDefaultAssertionStatus(boolean enabled)
- 
- Overrides:
- setDefaultAssertionStatusin class- ClassLoader
 
- 
 
setPackageAssertionStatus
public void setPackageAssertionStatus(String packageName,
                                      boolean enabled)
- 
- Overrides:
- setPackageAssertionStatusin class- ClassLoader
 
- 
 
setClassAssertionStatus
public void setClassAssertionStatus(String className,
                                    boolean enabled)
- 
- Overrides:
- setClassAssertionStatusin class- ClassLoader
 
- 
 
clearAssertionStatus
public void clearAssertionStatus()
- 
- Overrides:
- clearAssertionStatusin class- ClassLoader
 
- 
 
Copyright © 2015 Atlassian. All rights reserved.