harpoon.Backend.Maps
Class FieldMap

java.lang.Object
  extended by harpoon.Backend.Maps.FieldMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClassFieldMap, PackedClassFieldMap, TinyPackedClassFieldMap

public abstract class FieldMap
extends Object
implements Serializable

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.4 2003/04/19 01:03:54 salcianu Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Constructor Summary
FieldMap()
           
 
Method Summary
 int fieldAlignment(HField hf)
           
abstract  List<HField> 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<HField> 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)