KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > components > classloader > ContextClassLoaderManager


1 package org.apache.avalon.phoenix.components.classloader;
2
3 import java.io.File JavaDoc;
4 import org.apache.avalon.framework.configuration.Configuration;
5 import org.apache.avalon.phoenix.interfaces.ClassLoaderManager;
6
7 /**
8  * Basic ClassLoaderManager that just returns current
9  * ContextClassLoader.
10  *
11  * @author <a HREF="mailto:colus@apache.org">Eung-ju Park</a>
12  * @see ClassLoaderManager
13  */

14 public class ContextClassLoaderManager
15     implements ClassLoaderManager
16 {
17     /**
18      * Return current Context {@link ClassLoader}.
19      *
20      * @param environment ignored
21      * @param source the source of application. (usually the name of the .sar file
22      * or else the same as baseDirectory)
23      * @param baseDirectory the base directory of application
24      * @param workDirectory the work directory of application
25      * @param classPath the list of URLs in applications deployment
26      * @return the ContextClassLoader created
27      * @throws Exception if an error occurs
28      */

29     public ClassLoader JavaDoc createClassLoader( final Configuration environment,
30                                           final File JavaDoc source,
31                                           final File JavaDoc baseDirectory,
32                                           final File JavaDoc workDirectory,
33                                           final String JavaDoc[] classPath )
34         throws Exception JavaDoc
35     {
36         return Thread.currentThread().getContextClassLoader();
37     }
38 }
39
Popular Tags