harpoon.Backend.Analysis
Class InterfaceMethodMap

java.lang.Object
  extended by harpoon.Backend.Maps.MethodMap
      extended by harpoon.Backend.Analysis.InterfaceMethodMap
All Implemented Interfaces:
Serializable

public class InterfaceMethodMap
extends MethodMap

InterfaceMethodMap provides a mapping from interface methods to the offset that the method-pointers should have on the object layout.

Version:
$Id: InterfaceMethodMap.java,v 1.5 2004/02/08 01:57:24 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>
See Also:
Serialized Form

Constructor Summary
InterfaceMethodMap(ClassHierarchy ch)
          Creates a InterfaceMethodMap for interfaces in the given ClassHierarchy ch.
InterfaceMethodMap(Enumeration hclasses)
          Creates a InterfaceMethodMap for interfaces in hclasses.
 
Method Summary
 int methodOrder(HMethod hm)
          Returns an ordering of the given method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceMethodMap

public InterfaceMethodMap(Enumeration hclasses)
Creates a InterfaceMethodMap for interfaces in hclasses.
requires: hclasses is an Enumeration of HClass objects.
modifies: hclasses
effects: Iterates through hclasses, accumulating all of the interface-methods and returns a method->int mapping, where the integer returned represents the placement of the method. This method is not guaranteed to use any information besides what is passed to it; methods from interfaces not in hclasses are not required to be included in the method map returned, and interferences from classes not in hclasses are not required to be accounted for.

See Also:
HClass, ClassHierarchy, CallGraph

InterfaceMethodMap

public InterfaceMethodMap(ClassHierarchy ch)
Creates a InterfaceMethodMap for interfaces in the given ClassHierarchy ch.
effects: Iterates through the class hierarchy accumulating all of the interface-methods and returns a method->int mapping, where the integer returned represents the placement of the method. This method is not guaranteed to use any information besides what is passed to it; methods from interfaces not in the class hierarchy are not required to be included in the method map returned, and interferences from classes not in the class hierarchy are not required to be accounted for.

See Also:
HClass, ClassHierarchy, CallGraph
Method Detail

methodOrder

public int methodOrder(HMethod hm)
Returns an ordering of the given method.
requires: this contains an ordering for hm
effects: returns the zero-indexed integer corresponding to hm's placement in the ordering.

Specified by:
methodOrder in class MethodMap