Chaining Instance Reference Reader
class ChainingInstanceReferenceReader(virtualRefReaders: List<ChainingInstanceReferenceReader.VirtualInstanceReferenceReader>, flatteningInstanceReader: FlatteningPartitionedInstanceReferenceReader?, fieldRefReader: FieldInstanceReferenceReader) : ReferenceReader<HeapObject.HeapInstance>
A ReferenceReader that first delegates expanding to virtualRefReaders in order until one matches (or none), and then always proceeds with fieldRefReader. This means any synthetic ref will be on the shortest path, but we still explore the entire data structure so that we correctly track which objects have been visited and correctly compute dominators and retained size.
Constructors
Link copied to clipboard
constructor(virtualRefReaders: List<ChainingInstanceReferenceReader.VirtualInstanceReferenceReader>, flatteningInstanceReader: FlatteningPartitionedInstanceReferenceReader?, fieldRefReader: FieldInstanceReferenceReader)
Types
Link copied to clipboard
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.