1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.bcel.util;
18
19 import org.apache.bcel.classfile.JavaClass;
20
21 /***
22 * Abstract definition of a class repository. Instances may be used
23 * to load classes from different sources and may be used in the
24 * Repository.setRepository method.
25 *
26 * @see org.apache.bcel.Repository
27 * @version $Id: Repository.java 386056 2006-03-15 11:31:56Z tcurdt $
28 * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
29 * @author David Dixon-Peugh
30 */
31 public interface Repository extends java.io.Serializable {
32
33 /***
34 * Store the provided class under "clazz.getClassName()"
35 */
36 public void storeClass( JavaClass clazz );
37
38
39 /***
40 * Remove class from repository
41 */
42 public void removeClass( JavaClass clazz );
43
44
45 /***
46 * Find the class with the name provided, if the class
47 * isn't there, return NULL.
48 */
49 public JavaClass findClass( String className );
50
51
52 /***
53 * Find the class with the name provided, if the class
54 * isn't there, make an attempt to load it.
55 */
56 public JavaClass loadClass( String className ) throws java.lang.ClassNotFoundException;
57
58
59 /***
60 * Find the JavaClass instance for the given run-time class object
61 */
62 public JavaClass loadClass( Class clazz ) throws java.lang.ClassNotFoundException;
63
64
65 /*** Clear all entries from cache.
66 */
67 public void clear();
68
69
70 /*** Get the ClassPath associated with this Repository
71 */
72 public ClassPath getClassPath();
73 }