KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > clazzy > LoaderSelector


1 package org.sapia.clazzy;
2
3 import org.sapia.clazzy.loader.Loader;
4
5 /**
6  * An implementation of this interface is used to determine if given classes
7  * or resources correspond to given <code>Loader</code>s.
8  *
9  * @see org.sapia.clazzy.CompositeClassLoader
10  *
11  * @author Yanick Duchesne
12  *
13  * <dl>
14  * <dt><b>Copyright: </b>
15  * <dd>Copyright &#169; 2002-2004 <a HREF="http://www.sapia-oss.org">Sapia Open
16  * Source Software </a>. All Rights Reserved.</dd>
17  * </dt>
18  * <dt><b>License: </b>
19  * <dd>Read the license.txt file of the jar or visit the <a
20  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the Sapia
21  * OSS web site</dd>
22  * </dt>
23  * </dl>
24  */

25 public interface LoaderSelector {
26
27   /**
28    * @param className the name of a class.
29    * @param loader a <code>Loader</code>.
30    * @return <code>true</code> if the given <code>Loader</code> is in charge
31    * of providing the bytes of the class corresponding to the given class name.
32    */

33   public boolean acceptsClass(String JavaDoc className, Loader loader);
34
35   /**
36    * @param resourceName the name of a resource.
37    * @param loader a <code>Loader</code>.
38    * @return <code>true</code> if the given <code>Loader</code> is in charge
39    * of providing the bytes of the resource corresponding to the given resource name.
40    */

41   public boolean acceptsResource(String JavaDoc resourceName, Loader loader);
42
43 }
44
Popular Tags