Heap Instance
An instance in the heap dump.
Functions
Returns true if this is an instance of the class named className or an instance of a subclass of that class.
Returns true if this is an instance of expectedClass or an instance of a subclass of that class.
If this HeapInstance is an instance of the String class, returns a String instance with content that matches the string in the heap dump. Otherwise returns null.
Returns a HeapField object that reflects the specified declared field of the instance represented by this HeapInstance object, or null if this field does not exist. The declaringClassName specifies the class in which the desired field is declared, and the fieldName parameter specifies the simple name of the desired field.
The fields of this instance, as a sequence of HeapField.
Reads and returns the underlying InstanceDumpRecord.
Properties
This HeapObject as a HeapClass if it is one, or null otherwise
This HeapObject as a HeapInstance if it is one, or null otherwise
This HeapObject as a HeapObjectArray if it is one, or null otherwise
This HeapObject as a HeapPrimitiveArray if it is one, or null otherwise
The class of this instance.
The heap identifier of the class of this instance.
The name of the class of this instance, identical to Class.getName.
Returns instanceClassName stripped of any string content before the last period (included).
Whether this is an instance of a primitive wrapper type.
An positive object index that's specific to how Shark stores objects in memory. The index starts at 0 and ends at HeapGraph.objectCount - 1. There are no gaps, every index value corresponds to an object. Classes are first, then instances, then object arrays then primitive arrays.
objectId masked to be a positive unique identifier, as reported in Android Studio.
The total byte size for the record of this object in the heap dump.