KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > classloader > SharedLibraryClassLoader


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005 Fossil E-Commerce, http://www.fossilec.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: SharedLibraryClassLoader.java 216 2006-04-13 14:18:14Z ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.classloader;
23
24 import java.io.IOException JavaDoc;
25 import java.net.URL JavaDoc;
26 import java.net.URLStreamHandlerFactory JavaDoc;
27 import java.util.List JavaDoc;
28
29 /**
30  * This classLoader is used for a share library. The SharedLibraries-classloader
31  * use it to find classes requested by a JBIcomponent-classloader. The
32  * SharedLibraries-classloader has to call the protected method "findClass" on
33  * it. So this classloader exposes the "findclass" method as a public method.
34  *
35  * @version $Rev: 216 $ $Date: $
36  * @since Petals 1.0
37  * @author Adrien LOUIS
38  */

39 public class SharedLibraryClassLoader extends PetalsClassLoader {
40
41     public SharedLibraryClassLoader(URL JavaDoc[] baseUrls,
42         List JavaDoc<String JavaDoc> classpathLocations) throws IOException JavaDoc {
43         super(baseUrls, classpathLocations);
44     }
45
46     public SharedLibraryClassLoader(URL JavaDoc[] baseUrls,
47         List JavaDoc<String JavaDoc> classpathLocations, ClassLoader JavaDoc parent) throws IOException JavaDoc {
48         super(baseUrls, classpathLocations, parent);
49     }
50
51     public SharedLibraryClassLoader(URL JavaDoc[] baseUrls,
52         List JavaDoc<String JavaDoc> classpathLocations, ClassLoader JavaDoc parent,
53         URLStreamHandlerFactory JavaDoc factory) throws IOException JavaDoc {
54         super(baseUrls, classpathLocations, parent, factory);
55     }
56
57     /**
58      * Expose the protected <code>findLoadedClass</code> method. Used by the
59      * ShareLibraries class loader
60      *
61      * @param className
62      * @return
63      */

64     Class JavaDoc<?> findLoadedClazz(String JavaDoc className) {
65         return super.findLoadedClass(className);
66     }
67 }
68
Popular Tags