|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dtfj.analyzer.util.ObjectIDFactory
public class ObjectIDFactory
A factory class to build object IDs from addresses. The aim is to build the smallest IDs possible by subtracting the lowest possible address and then dividing by the object allocation boundary size. We also record a boolean property that gives a hint to other classes that it may be possible to represent object IDs as ints rather than longs which may significantly reduce the size of cross reference chains etc.
Constructor Summary | |
---|---|
ObjectIDFactory(long minAddr,
int grain,
boolean intAddressing)
Build a new factory given the lowest possible address, heap grain and a flag to specify that integer addressing is possible. |
Method Summary | |
---|---|
long |
getObjectID(com.ibm.dtfj.java.JavaObject obj)
Convert from an object to an ID |
long |
getObjectID(long addr)
Convert from an address to an object ID |
boolean |
isIntAddressing()
Is integer addressing possible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectIDFactory(long minAddr, int grain, boolean intAddressing)
minAddr
- lowest possible addressgrain
- object allocation boundaryintAddressing
- is integer addressing possibleMethod Detail |
---|
public long getObjectID(com.ibm.dtfj.java.JavaObject obj)
obj
- the object
public long getObjectID(long addr)
addr
- the address
public boolean isIntAddressing()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |