| Modifier and Type | Class and Description |
|---|---|
| private class | SizeOf.CachingSizeOfVisitor
Will Cache already visited types |
| private class | SizeOf.SizeOfVisitor
Will return the sizeOf each instance |
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private final ObjectGraphWalker |
| Access | Constructor and Description |
|---|---|
| public | SizeOf(SizeOfFilter
The filter to apply fieldFilter, boolean whether to cache reflected fields caching)Builds a new SizeOf that will filter fields according to the provided filter |
| Modifier and Type | Method and Description |
|---|---|
| public Size | Returns: the total size in bytes for these objectsmaximum depth of the object graph to traverse maxDepth, boolean true if the object traversal should be aborted when the max depth is exceeded abortWhenMaxDepthExceeded, Object... the root objects of the graphs to measure obj)Measures the size in memory (heap) of the objects passed in, walking their graph down Any overlap of the graphs being passed in will be recognized and only measured once |
| public abstract long |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| walker | back to summary |
|---|---|
| private final ObjectGraphWalker walker | |
| SizeOf | back to summary |
|---|---|
| public SizeOf(SizeOfFilter fieldFilter, boolean caching) Builds a new SizeOf that will filter fields according to the provided filter
| |
| deepSizeOf | back to summary |
|---|---|
| public Size deepSizeOf(int maxDepth, boolean abortWhenMaxDepthExceeded, Object... obj) Measures the size in memory (heap) of the objects passed in, walking their graph down Any overlap of the graphs being passed in will be recognized and only measured once
| |
| sizeOf | back to summary |
|---|---|
| public abstract long sizeOf(Object obj) Calculates the size in memory (heap) of the instance passed in, not navigating the down graph
| |
| Modifier and Type | Field and Description |
|---|---|
| private final WeakIdentityConcurrentMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long | visit(final Object
the reference at that node object)Implements net. |
| cache | back to summary |
|---|---|
| private final WeakIdentityConcurrentMap<Class<?>, Long> cache | |
| CachingSizeOfVisitor | back to summary |
|---|---|
| private CachingSizeOfVisitor() | |
| visit | back to summary |
|---|---|
| public long visit(final Object object) Implements net. Doc from net. The visit method executed on each node
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public long | visit(Object
the reference at that node object)Implements net. |
| SizeOfVisitor | back to summary |
|---|---|
| private SizeOfVisitor() | |
| visit | back to summary |
|---|---|
| public long visit(Object object) Implements net. Doc from net. The visit method executed on each node
| |