1 cananian 1.1.2.1 // MethodMap.java, created Sat Jan 16 21:20:45 1999 by cananian 2 cananian 1.1.2.2 // Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu> 3 cananian 1.1.2.2 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 cananian 1.1.2.1 package harpoon.Backend.Maps; 5 cananian 1.1.2.1 6 cananian 1.1.2.1 import harpoon.ClassFile.HMethod; 7 cananian 1.1.2.1 8 cananian 1.1.2.1 /** 9 cananian 1.1.2.1 * A <code>MethodMap</code> assigns an ordering to the methods in a 10 cananian 1.1.2.1 * class. Typically a separate <code>MethodMap</code> will be used for 11 cananian 1.1.2.1 * class and interface methods. Note that a <code>MethodMap</code> 12 cananian 1.1.2.1 * does <u>not</u> specify a direct offset, since the size of each 13 cananian 1.1.2.1 * method pointer will be machine-dependent and the start of the 14 cananian 1.1.2.1 * method table may be offset from the class descriptor pointer. The 15 cananian 1.1.2.1 * function of an <code>OffsetMap</code> is to take the orderings 16 cananian 1.1.2.1 * specified by a pair of <code>MethodMap</code>s (one for 17 cananian 1.1.2.1 * single-inheritance classes, one for interfaces) and layout a class 18 cananian 1.1.2.1 * descriptor table from it, computing appropriate byte offsets to the 19 cananian 1.1.2.1 * various method pointers. 20 cananian 1.1.2.1 * 21 cananian 1.1.2.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 22 salcianu 1.3 * @version $Id: MethodMap.java,v 1.3 2003/04/19 01:03:54 salcianu Exp $ */ 23 salcianu 1.3 public abstract class MethodMap implements java.io.Serializable { 24 cananian 1.1.2.1 /** Return an ordering of the given method. */ 25 cananian 1.1.2.1 public abstract int methodOrder(HMethod hm); 26 cananian 1.2 }