HeapObjectArray

class HeapObjectArray : HeapObject

An object array in the heap dump.

Functions

readByteSize
Link copied to clipboard
fun readByteSize(): Int

The total byte shallow size of elements in this array.

readElements
Link copied to clipboard
fun readElements(): Sequence<HeapValue>

The elements in this array, as a sequence of HeapValue.

readRecord
Link copied to clipboard
open override fun readRecord(): HprofRecord.HeapDumpRecord.ObjectRecord.ObjectArrayDumpRecord

Reads and returns the underlying ObjectArrayDumpRecord.

toString
Link copied to clipboard
open override fun toString(): String

Properties

arrayClass
Link copied to clipboard
val arrayClass: HeapObject.HeapClass

The class of this array.

arrayClassId
Link copied to clipboard
val arrayClassId: Long

The heap identifier of the class of this array.

arrayClassName
Link copied to clipboard
val arrayClassName: String

The name of the class of this array, identical to Class.getName.

arrayClassSimpleName
Link copied to clipboard
val arrayClassSimpleName: String

Returns arrayClassName stripped of any string content before the last period (included).

asClass
Link copied to clipboard
val asClass: HeapObject.HeapClass?

This HeapObject as a HeapClass if it is one, or null otherwise

asInstance
Link copied to clipboard
val asInstance: HeapObject.HeapInstance?

This HeapObject as a HeapInstance if it is one, or null otherwise

asObjectArray
Link copied to clipboard
val asObjectArray: HeapObject.HeapObjectArray?

This HeapObject as a HeapObjectArray if it is one, or null otherwise

asPrimitiveArray
Link copied to clipboard
val asPrimitiveArray: HeapObject.HeapPrimitiveArray?

This HeapObject as a HeapPrimitiveArray if it is one, or null otherwise

graph
Link copied to clipboard
open override val graph: HeapGraph

The graph of objects in the heap, which you can use to navigate the heap.

objectId
Link copied to clipboard
open override val objectId: Long

The heap identifier of this object.

objectIndex
Link copied to clipboard
open override val objectIndex: Int

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.

recordSize
Link copied to clipboard
open override val recordSize: Int

The total byte size for the record of this object in the heap dump.