harpoon.Backend.Analysis
Class SortedClassFieldMap

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

public abstract class SortedClassFieldMap
extends ClassFieldMap

A SortedClassFieldMap is an extension of ClassFieldMap which sorts object fields to minimize "holes" between fields.

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

Constructor Summary
SortedClassFieldMap()
          Creates a SortedClassFieldMap.
 
Method Summary
protected  HField[] declaredFields(HClass hc)
          Return the declared fields of the specified class in the order in which they should be allocated.
 
Methods inherited from class harpoon.Backend.Analysis.ClassFieldMap
fieldList, fieldOffset
 
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

SortedClassFieldMap

public SortedClassFieldMap()
Creates a SortedClassFieldMap.

Method Detail

declaredFields

protected HField[] declaredFields(HClass hc)
Description copied from class: ClassFieldMap
Return the declared fields of the specified class in the order in which they should be allocated. This implementation just returns the result of hc.getDeclaredFields(), but you can override this to use a more intelligent sorting routine to save space. You do not have to filter static methods out of the returned array, but you may if you like.

Overrides:
declaredFields in class ClassFieldMap