Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/shark/HeapField

HeapField

[jvm]\ class HeapField(val declaringClass: HeapObject.HeapClass, val name: String, val value: HeapValue)

Represents a static field or an instance field.

Constructors

HeapField [jvm]
constructor(declaringClass: HeapObject.HeapClass, name: String, value: HeapValue)

Properties

Name Summary
declaringClass [jvm]
val declaringClass: HeapObject.HeapClass
The class this field was declared in.
name [jvm]
val name: String
Name of the field
value [jvm]
val value: HeapValue
Value of the field. Also see shorthands valueAsClass, valueAsInstance, valueAsObjectArray, valueAsPrimitiveArray.
valueAsClass [jvm]
val valueAsClass: HeapObject.HeapClass?
Return a HeapClass is value references a class, and null otherwise.
valueAsInstance [jvm]
val valueAsInstance: HeapObject.HeapInstance?
Return a HeapInstance is value references an instance, and null otherwise.
valueAsObjectArray [jvm]
val valueAsObjectArray: HeapObject.HeapObjectArray?
Return a HeapObjectArray is value references an object array, and null otherwise.
valueAsPrimitiveArray [jvm]
val valueAsPrimitiveArray: HeapObject.HeapPrimitiveArray?
Return a HeapPrimitiveArray is value references a primitive array, and null otherwise.