//leakcanary-repo/shark/ChainingInstanceReferenceReader/VirtualInstanceReferenceReader
VirtualInstanceReferenceReader¶
interface VirtualInstanceReferenceReader : ReferenceReader<HeapObject.HeapInstance>
Same as ReferenceReader but read is only invoked when matches returns true. matches should return false if this VirtualInstanceReferenceReader implementation isn’t able to expand the provided instance, in which case ChainingInstanceReferenceReader will delegate to the next VirtualInstanceReferenceReader implementation.
Inheritors¶
JavaLocalReferenceReader |
Types¶
Name | Summary |
---|---|
ChainFactory | [jvm] fun interface ChainFactory Creates a list of VirtualInstanceReferenceReader where the content of the list depends on the classes in the heap graph and their implementation. This is a chain as VirtualInstanceReferenceReader elements in the list will process references in order in ChainingInstanceReferenceReader. |
OptionalFactory | [jvm] fun interface OptionalFactory May create a new VirtualInstanceReferenceReader, depending on what’s in the heap graph. OptionalFactory implementations might return a different ReferenceReader depending on which version of a class is present in the heap dump, or they might return null if that class is missing. |
Functions¶
Name | Summary |
---|---|
matches | [jvm] abstract fun matches(instance: HeapObject.HeapInstance): Boolean |
read | [jvm] abstract fun read(source: HeapObject.HeapInstance): Sequence<Reference> Returns the sequences of non null outgoing references from source. Outgoing refs can be actual JVM references or they can be virtual references when simplifying known data structures. |
Properties¶
Name | Summary |
---|---|
readsCutSet | [jvm] abstract val readsCutSet: Boolean https://en.wikipedia.org/wiki/Cut_(graph_theory) A cut is a partition of the vertices of a graph into two disjoint subsets. Any cut determines a cut-set, the set of edges that have one endpoint in each subset of the partition. These edges are said to cross the cut. |