harpoon.Backend.Analysis
Class PackedClassFieldMap

java.lang.Object
  extended by harpoon.Backend.Maps.FieldMap
      extended by harpoon.Backend.Analysis.PackedClassFieldMap
All Implemented Interfaces:
Serializable

public abstract class PackedClassFieldMap
extends FieldMap

PackedClassFieldMap is a FieldMap for non-static fields of a class which attempts to maximally fill holes in the data structure (even if this means commingling a subclass' fields with those of its superclass) in order to minimize the space required by objects.

Version:
$Id: PackedClassFieldMap.java,v 1.4 2002/04/10 03:02:22 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

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

Constructor Detail

PackedClassFieldMap

public PackedClassFieldMap()
Creates a PackedClassFieldMap.

Method Detail

fieldOffset

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

Specified by:
fieldOffset in class FieldMap

fieldList

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

Specified by:
fieldList in class FieldMap