Package gw.util.perf.objectsize
Class ObjectSizeUtil
java.lang.Object
gw.util.perf.objectsize.ObjectSizeUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectSizedeepSizeOf(Object obj) static ObjectSizedeepSizeOf(Object obj, IObjectSizeFilter filter, int maxObjects) Calculates full size of object iterating over its hierarchy graph.static intgetFieldSize(Class clazz) static intstatic void
-
Field Details
-
VERBOSE
public static boolean VERBOSE
-
-
Constructor Details
-
ObjectSizeUtil
public ObjectSizeUtil()
-
-
Method Details
-
getFieldSize
-
getPointerSize
public static int getPointerSize() -
deepSizeOf
Calculates full size of object iterating over its hierarchy graph.- Parameters:
obj- object to calculate size offilter- the filter used to ignore fields or objectsmaxObjects- the max numbers of objects to traverse- Returns:
- object size
- Throws:
Exception
-
deepSizeOf
-
main
- Throws:
Exception
-