org.apache.cocoon.components.classloader
Class DefaultClassLoaderFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.classloader.DefaultClassLoaderFactory
- All Implemented Interfaces:
- ClassLoaderFactory, Disposable, LogEnabled, Serviceable, ThreadSafe
- public class DefaultClassLoaderFactory
- extends AbstractLogEnabled
- implements ClassLoaderFactory, Serviceable, ThreadSafe, Disposable
Default implementation of ClassLoaderFactory
. It accepts both class directory and jar
directory configurations.
Wildcard patterns can also be specified to include or exclude some classes to be loaded in the
classloader. In such case, the class is directly loaded from the parent classloader. The default
is to include all classes.
Example:
<classpath>
<class-dir src="BLOCK-INF/classes"/>
<lib-dir src="BLOCK-INF/lib"/>
<include-classes pattern="org.apache.cocoon.**"/>
<exclude-classes pattern="org.apache.cocoon.transformation.**"/>
&/lt;classpath>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultClassLoaderFactory
public DefaultClassLoaderFactory()
service
public void service(ServiceManager manager)
throws ServiceException
- Specified by:
service
in interface Serviceable
- Throws:
ServiceException
createClassLoader
public ClassLoader createClassLoader(ClassLoader parent,
Configuration config)
throws ConfigurationException
- Specified by:
createClassLoader
in interface ClassLoaderFactory
- Throws:
ConfigurationException
dispose
public void dispose()
- Specified by:
dispose
in interface Disposable
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.