org.mule.module.launcher.application
Class CompositeApplicationClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.mule.module.launcher.application.CompositeApplicationClassLoader
All Implemented Interfaces:
Closeable, ApplicationClassLoader

public class CompositeApplicationClassLoader
extends ClassLoader
implements ApplicationClassLoader, Closeable

Defines a classloader that delegates classes and resources resolution to a list of classloaders.


Field Summary
protected static Log logger
           
 
Constructor Summary
CompositeApplicationClassLoader(String appName, List<ClassLoader> classLoaders)
           
 
Method Summary
 void close()
           
protected  String findLibrary(String s)
           
protected  String findLibrary(String s, ClassLoader classLoader)
           
 URL findResource(String s)
           
 String getAppName()
           
 URL getResource(String s)
           
 InputStream getResourceAsStream(String s)
           
 Enumeration<URL> getResources(String s)
           
protected  Class<?> loadClass(ClassLoader classLoader, String s, boolean b)
           
 Class<?> loadClass(String s)
           
protected  Class<?> loadClass(String s, boolean b)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, 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
 

Field Detail

logger

protected static final Log logger
Constructor Detail

CompositeApplicationClassLoader

public CompositeApplicationClassLoader(String appName,
                                       List<ClassLoader> classLoaders)
Method Detail

getAppName

public String getAppName()
Specified by:
getAppName in interface ApplicationClassLoader

loadClass

public Class<?> loadClass(String s)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

loadClass

protected Class<?> loadClass(String s,
                             boolean b)
                      throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

loadClass

protected Class<?> loadClass(ClassLoader classLoader,
                             String s,
                             boolean b)
                      throws ClassNotFoundException
Throws:
ClassNotFoundException

getResource

public URL getResource(String s)
Overrides:
getResource in class ClassLoader

getResourceAsStream

public InputStream getResourceAsStream(String s)
Overrides:
getResourceAsStream in class ClassLoader

findLibrary

protected String findLibrary(String s)
Overrides:
findLibrary in class ClassLoader

findLibrary

protected String findLibrary(String s,
                             ClassLoader classLoader)

getResources

public Enumeration<URL> getResources(String s)
                              throws IOException
Overrides:
getResources in class ClassLoader
Throws:
IOException

findResource

public URL findResource(String s)
Specified by:
findResource in interface ApplicationClassLoader
Overrides:
findResource in class ClassLoader

close

public void close()
Specified by:
close in interface Closeable


Copyright © 2003-2013 MuleSoft, Inc.. All Rights Reserved.