1 cananian 1.7.2.1 // HCodeElement.java, created Sun Aug  2 20:11:27 1998 by cananian
 2 cananian 1.7     // Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu>
 3 cananian 1.7     // Licensed under the terms of the GNU GPL; see COPYING for details.
 4 cananian 1.1     package harpoon.ClassFile;
 5 cananian 1.1     
 6 cananian 1.1     /**
 7 cananian 1.1      * <Code>HCodeElement</code> is an interface that all views of a particular
 8 cananian 1.1      * method's executable instructions should implement.<p>
 9 cananian 1.2      * <code>HCodeElement</code>s are "components" of an <code>HCode</code>.
10 cananian 1.1      * The correspond roughly to "an instruction" in the <code>HCode</code>
11 cananian 1.5      * "list of instructions".  Each <code>HCodeElement</code> should be
12 cananian 1.5      * traceable to an original source file and line number, and possess
13 cananian 1.5      * a unique numeric identifier.
14 cananian 1.1      *
15 cananian 1.1      * @author  C. Scott Ananian <cananian@alumni.princeton.edu>
16 cananian 1.8      * @version $Id: HCodeElement.java,v 1.8 2002/02/25 21:03:03 cananian Exp $
17 cananian 1.1      * @see HCode
18 cananian 1.6      * @see harpoon.IR.Bytecode.Instr
19 cananian 1.1      */
20 cananian 1.1     public interface HCodeElement {
21 cananian 1.1       /** Get the original source file name that this element is derived from. */
22 cananian 1.1       public String getSourceFile();
23 cananian 1.1       /** Get the line in the original source file that this element is 
24 cananian 1.1        *  traceable to. */
25 cananian 1.1       public int getLineNumber();
26 cananian 1.4       /**
27 cananian 1.4        * Returns a unique numeric identifier for this element.
28 cananian 1.4        */
29 cananian 1.4       public int getID();
30 cananian 1.1     }