public class CompositeApplicationClassLoader extends ClassLoader implements ApplicationClassLoader
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
CompositeApplicationClassLoader(String appName,
List<ClassLoader> classLoaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
addShutdownListener(ShutdownListener listener)
Adds a shutdown listener to the class loader.
|
void |
dispose()
Gets rid of the class loader resources.
|
protected String |
findLibrary(String libname) |
protected String |
findLibrary(String libname,
ClassLoader classLoader) |
URL |
findLocalResource(String resourceName)
This method finds a resource in the local environment for this artifact, if the resource is not found and the
artifact has a parent artifact then the operation is resolved by that parent, if there is no parent, the resources
is searched in the global environment.
|
URL |
findResource(String name) |
String |
getAppName() |
String |
getArtifactName() |
ClassLoader |
getClassLoader()
ClassLoader is an abstract class.
|
URL |
getResource(String name) |
InputStream |
getResourceAsStream(String name) |
Enumeration<URL> |
getResources(String name) |
protected Class<?> |
loadClass(ClassLoader classLoader,
String name,
boolean resolve) |
Class<?> |
loadClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLoadedClass, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic CompositeApplicationClassLoader(String appName, List<ClassLoader> classLoaders)
public String getAppName()
getAppName in interface ApplicationClassLoaderpublic Class<?> loadClass(String name) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> loadClass(ClassLoader classLoader, String name, boolean resolve) throws ClassNotFoundException
ClassNotFoundExceptionpublic URL getResource(String name)
getResource in class ClassLoaderpublic InputStream getResourceAsStream(String name)
getResourceAsStream in class ClassLoaderprotected String findLibrary(String libname)
findLibrary in class ClassLoaderprotected String findLibrary(String libname, ClassLoader classLoader)
public Enumeration<URL> getResources(String name) throws IOException
getResources in class ClassLoaderIOExceptionpublic String getArtifactName()
getArtifactName in interface ArtifactClassLoaderpublic URL findResource(String name)
findResource in interface ApplicationClassLoaderfindResource in interface ArtifactClassLoaderfindResource in class ClassLoadername - name of the resource to find.public URL findLocalResource(String resourceName)
LocalResourceLocatorfindLocalResource in interface LocalResourceLocatorresourceName - name of the resource to find.public ClassLoader getClassLoader()
ArtifactClassLoadergetClassLoader in interface ArtifactClassLoaderpublic void dispose()
DisposableClassLoaderdispose in interface DisposableClassLoaderpublic void addShutdownListener(ShutdownListener listener)
ArtifactClassLoaderaddShutdownListener in interface ArtifactClassLoaderCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.