|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--anthill.util.Analyzer
This class can be used to analyze the memory footprint of an object reference. Memory footprint is computed recursively, by adding the memory footprint of the fields of the referenced object and the memory footprint of the objects referenced by these objects. Furthermore, this class can be used to obtain information about the classes referenced (directly or indirectly) by an object and the number of instances for each classes.
Constructor Summary | |
Analyzer()
|
Method Summary | |
static Collection |
countClasses(Object obj)
Returns a collection of InstanceCount objects, one for
each of the classes referenced (directly or indirectly)
by the specified object. |
static int |
footprint(Object obj)
Returns the memory footprint of the specified object, computed recursively by adding the footprint of the fields of the object and the footprint of each of the objects referenced by it. |
static String |
printClasses(Object obj)
Returns a string containing information about the classes referenced (directly or indirectly) by the specified object and the number of instances for each classes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Analyzer()
Method Detail |
public static int footprint(Object obj)
public static Collection countClasses(Object obj)
InstanceCount
objects, one for
each of the classes referenced (directly or indirectly)
by the specified object. InstanceCount
objects may
be used to obtain the number of instances for each of the
classes reference by the specified object.
public static String printClasses(Object obj)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |