public class CompositeApplicationClassLoader extends ClassLoader implements ApplicationClassLoader
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, setSigners
protected static final Log logger
public CompositeApplicationClassLoader(String appName, List<ClassLoader> classLoaders)
public String getAppName()
getAppName
in interface ApplicationClassLoader
public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> loadClass(ClassLoader classLoader, String name, boolean resolve) throws ClassNotFoundException
ClassNotFoundException
public URL getResource(String name)
getResource
in class ClassLoader
public InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
protected String findLibrary(String libname)
findLibrary
in class ClassLoader
protected String findLibrary(String libname, ClassLoader classLoader)
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
public String getArtifactName()
getArtifactName
in interface ArtifactClassLoader
public URL findResource(String name)
findResource
in interface ApplicationClassLoader
findResource
in interface ArtifactClassLoader
findResource
in class ClassLoader
name
- name of the resource to find.public URL findLocalResource(String resourceName)
LocalResourceLocator
findLocalResource
in interface LocalResourceLocator
resourceName
- name of the resource to find.public ClassLoader getClassLoader()
ArtifactClassLoader
getClassLoader
in interface ArtifactClassLoader
public void dispose()
DisposableClassLoader
dispose
in interface DisposableClassLoader
public void addShutdownListener(ShutdownListener listener)
ArtifactClassLoader
addShutdownListener
in interface ArtifactClassLoader
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.