| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | ObjectGraphWalker.Visitor
The visitor to execute the function on each node of the graph This is only to be used for the sizing of an object graph in memory! |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final WeakIdentityConcurrentMap | |
| private static final String | |
| private final WeakIdentityConcurrentMap | |
| private static final Logger | |
| private final SizeOfFilter | |
| private static final String | |
| private static final boolean | |
| private static final String | |
| private final ObjectGraphWalker. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ObjectGraphWalker(ObjectGraphWalker.
the visitor to use visitor,the filtering filter)Constructor |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private boolean | checkMaxDepth(final int maxDepth, final boolean abortWhenMaxDepthExceeded, boolean warned, final IdentityHashMap<Object, Object> visited)
|
| private static Collection | Returns: all fields for that typethe type refClass)Returns all non-primitive fields for the entire class hierarchy of a type |
| private Collection | Returns: A collection of fields to be visitedthe type refClass)Returns the filtered fields for a particular type |
| private static boolean | |
| private static boolean | |
| private static void | |
| private boolean | |
| pack-priv long | Returns: the sum of all Visitor#visit returned valuesmaximum depth to traverse the object graph maxDepth, boolean true if the object traversal should be aborted when the max depth is exceeded abortWhenMaxDepthExceeded, Object... the roots of the objects (a shared graph will only be visited once) root)Walk the graph and call into the "visitor" |
| ABORT_MESSAGE | back to summary |
|---|---|
| private static final String ABORT_MESSAGE | |
| classCache | back to summary |
|---|---|
| private final WeakIdentityConcurrentMap<Class<?>, Boolean> classCache | |
| CONTINUE_MESSAGE | back to summary |
|---|---|
| private static final String CONTINUE_MESSAGE | |
| fieldCache | back to summary |
|---|---|
| private final WeakIdentityConcurrentMap<Class<?>, SoftReference<Collection<Field>>> fieldCache | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| sizeOfFilter | back to summary |
|---|---|
| private final SizeOfFilter sizeOfFilter | |
| TC_INTERNAL_FIELD_PREFIX | back to summary |
|---|---|
| private static final String TC_INTERNAL_FIELD_PREFIX | |
| USE_VERBOSE_DEBUG_LOGGING | back to summary |
|---|---|
| private static final boolean USE_VERBOSE_DEBUG_LOGGING | |
| VERBOSE_DEBUG_LOGGING | back to summary |
|---|---|
| private static final String VERBOSE_DEBUG_LOGGING | |
| visitor | back to summary |
|---|---|
| private final ObjectGraphWalker. | |
| ObjectGraphWalker | back to summary |
|---|---|
| pack-priv ObjectGraphWalker(ObjectGraphWalker. Constructor
| |
| calculateSize | back to summary |
|---|---|
| private long calculateSize(Object ref) | |
| checkMaxDepth | back to summary |
|---|---|
| private boolean checkMaxDepth(final int maxDepth, final boolean abortWhenMaxDepthExceeded, boolean warned, final IdentityHashMap<Object, Object> visited) | |
| getAllFields | back to summary |
|---|---|
| private static Collection Returns all non-primitive fields for the entire class hierarchy of a type
| |
| getFilteredFields | back to summary |
|---|---|
| private Collection Returns the filtered fields for a particular type
| |
| getVerboseSizeOfDebugLogging | back to summary |
|---|---|
| private static boolean getVerboseSizeOfDebugLogging() | |
| isSharedFlyweight | back to summary |
|---|---|
| private static boolean isSharedFlyweight(Object obj) | |
| nullSafeAdd | back to summary |
|---|---|
| private static void nullSafeAdd(final Stack<Object> toVisit, final Object o) | |
| shouldWalkClass | back to summary |
|---|---|
| private boolean shouldWalkClass(Class<?> refClass) | |
| walk | back to summary |
|---|---|
| pack-priv long walk(int maxDepth, boolean abortWhenMaxDepthExceeded, Object... root) Walk the graph and call into the "visitor"
| |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| visit | back to summary |
|---|---|
| public long visit(Object object) The visit method executed on each node
| |