org.apache.cocoon.components.classloader
Class ClassLoaderManagerImpl
java.lang.Object
|
+--org.apache.cocoon.components.classloader.ClassLoaderManagerImpl
- All Implemented Interfaces:
- ClassLoaderManager, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.thread.ThreadSafe
- public class ClassLoaderManagerImpl
- extends java.lang.Object
- implements ClassLoaderManager, org.apache.avalon.framework.thread.ThreadSafe
A singleton-like implementation of ClassLoaderManager
- Version:
- CVS $Id: ClassLoaderManagerImpl.java,v 1.5 2002/02/22 07:00:06 cziegeler Exp $
- Author:
- Ricardo Rocha
Constructor Summary |
ClassLoaderManagerImpl()
A constructor that ensures only a single class loader instance exists |
Method Summary |
void |
addDirectory(java.io.File directoryName)
Add a directory to the proxied class loader |
java.lang.Class |
loadClass(java.lang.String className)
Load a class through the proxied class loader |
void |
reinstantiate()
Reinstantiate the proxied class loader to allow for class reloading |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
protected static RepositoryClassLoader instance
- The single class loader instance
fileSet
protected static java.util.Set fileSet
ClassLoaderManagerImpl
public ClassLoaderManagerImpl()
- A constructor that ensures only a single class loader instance exists
addDirectory
public void addDirectory(java.io.File directoryName)
throws java.io.IOException
- Add a directory to the proxied class loader
- Specified by:
addDirectory
in interface ClassLoaderManager
- Parameters:
directoryName
- The repository name- Throws:
java.io.IOException
- If the directory is invalid
loadClass
public java.lang.Class loadClass(java.lang.String className)
throws java.lang.ClassNotFoundException
- Load a class through the proxied class loader
- Specified by:
loadClass
in interface ClassLoaderManager
- Parameters:
className
- The name of the class to be loaded- Returns:
- The loaded class
- Throws:
java.lang.ClassNotFoundException
- If the class is not found
reinstantiate
public void reinstantiate()
- Reinstantiate the proxied class loader to allow for class reloading
- Specified by:
reinstantiate
in interface ClassLoaderManager
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.