org.restlet.engine.util
Class EngineClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.restlet.engine.util.EngineClassLoader

public class EngineClassLoader
extends ClassLoader

Flexible engine class loader. Uses the current class's class loader as its parent. Can also check with the user class loader defined by Engine.getUserClassLoader() or with Thread.getContextClassLoader() or with Class.forName(String).

Author:
Jerome Louvel

Constructor Summary
EngineClassLoader(Engine engine)
          Constructor.
 
Method Summary
protected  Class<?> findClass(String name)
           
protected  URL findResource(String name)
           
protected  Enumeration<URL> findResources(String name)
           
protected  Engine getEngine()
          Returns the parent Restlet engine.
 Enumeration<URL> getResources(String name)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EngineClassLoader

public EngineClassLoader(Engine engine)
Constructor.

Method Detail

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
Overrides:
findClass in class ClassLoader
Throws:
ClassNotFoundException

findResource

protected URL findResource(String name)
Overrides:
findResource in class ClassLoader

findResources

protected Enumeration<URL> findResources(String name)
                                  throws IOException
Overrides:
findResources in class ClassLoader
Throws:
IOException

getEngine

protected Engine getEngine()
Returns the parent Restlet engine.

Returns:
The parent Restlet engine.

getResources

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


Copyright © 2005-2013 Restlet.