harpoon.Backend.Maps
Class FieldMap

java.lang.Object
  |
  +--harpoon.Backend.Maps.FieldMap
Direct Known Subclasses:
ClassFieldMap, PackedClassFieldMap

public abstract class FieldMap
extends Object

A FieldMap assigns an ordering to a set of fields. Typically separate FieldMaps will be used for class fields (which are allocated locally) and static fields (which are allocated globally). Note that the ordering corresponds directly to an offset from the first ordered field when the size returned by fieldSize() is taken into account.

Version:
$Id: FieldMap.java,v 1.2 2002/02/25 21:01:57 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
FieldMap()
           
 
Method Summary
 int fieldAlignment(HField hf)
           
abstract  List fieldList(HClass hc)
          Return an unmodifiable List over all appropriate fields in the given class, in order from smallest to largest offset.
abstract  int fieldOffset(HField hf)
          Return an offset to the given field.
abstract  int fieldSize(HField hf)
          Return the allocated size of a given field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldMap

public FieldMap()
Method Detail

fieldOffset

public abstract int fieldOffset(HField hf)
Return an offset to the given field.


fieldList

public abstract List fieldList(HClass hc)
Return an unmodifiable List over all appropriate fields in the given class, in order from smallest to largest offset.


fieldSize

public abstract int fieldSize(HField hf)
Return the allocated size of a given field.


fieldAlignment

public int fieldAlignment(HField hf)