1 package serp.bytecode;
2
3 import serp.bytecode.lowlevel.*;
4
5 /***
6 * Interface implemented by all bytecode entities. Entities must be able
7 * to access the project, constant pool, and class loader of the current class.
8 *
9 * @author Abe White
10 */
11 public interface BCEntity {
12 /***
13 * Return the project of the current class.
14 */
15 public Project getProject();
16
17 /***
18 * Return the constant pool of the current class.
19 */
20 public ConstantPool getPool();
21
22 /***
23 * Return the class loader to use when loading related classes.
24 */
25 public ClassLoader getClassLoader();
26
27 /***
28 * Return false if this entity has been removed from its parent; in this
29 * case the results of any operations on the entity are undefined.
30 */
31 public boolean isValid();
32 }