|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Backend.Maps.FieldMap
harpoon.Backend.Analysis.ClassFieldMap
public abstract class ClassFieldMap
A ClassFieldMap
is a FieldMap
for
non-static fields of a class. The user must implement a function
giving the size of a field to complete the implementation.
Results are cached for efficiency.
Constructor Summary | |
---|---|
ClassFieldMap()
Creates a ClassFieldMap . |
Method Summary | |
---|---|
protected HField[] |
declaredFields(HClass hc)
Return the declared fields of the specified class in the order in which they should be allocated. |
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 |
---|
public ClassFieldMap()
ClassFieldMap
.
Method Detail |
---|
public int fieldOffset(HField hf)
FieldMap
fieldOffset
in class FieldMap
public List<HField> fieldList(HClass hc)
FieldMap
fieldList
in class FieldMap
protected HField[] declaredFields(HClass hc)
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |