public class ObjectSizeUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
VERBOSE |
| Constructor and Description |
|---|
ObjectSizeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ObjectSize |
deepSizeOf(Object obj) |
static ObjectSize |
deepSizeOf(Object obj,
IObjectSizeFilter filter,
int maxObjects)
Calculates full size of object iterating over its hierarchy graph.
|
static int |
getFieldSize(Class clazz) |
static int |
getPointerSize() |
static void |
main(String[] args) |
public static int getFieldSize(Class clazz)
public static int getPointerSize()
public static ObjectSize deepSizeOf(Object obj, IObjectSizeFilter filter, int maxObjects)
obj - object to calculate size offilter - the filter used to ignore fields or objectsmaxObjects - the max numbers of objects to traverseExceptionpublic static ObjectSize deepSizeOf(Object obj)
Copyright © 2016. All rights reserved.