001 package serp.bytecode;
002
003 import serp.bytecode.lowlevel.*;
004
005 /**
006 * Interface implemented by all bytecode entities. Entities must be able
007 * to access the project, constant pool, and class loader of the current class.
008 *
009 * @author Abe White
010 */
011 public interface BCEntity {
012 /**
013 * Return the project of the current class.
014 */
015 public Project getProject();
016
017 /**
018 * Return the constant pool of the current class.
019 */
020 public ConstantPool getPool();
021
022 /**
023 * Return the class loader to use when loading related classes.
024 */
025 public ClassLoader getClassLoader();
026
027 /**
028 * Return false if this entity has been removed from its parent; in this
029 * case the results of any operations on the entity are undefined.
030 */
031 public boolean isValid();
032 }