Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/shark/ReferencePattern/InstanceFieldPattern

InstanceFieldPattern

[jvm]\ data class InstanceFieldPattern(val className: String, val fieldName: String) : ReferencePattern

Matches instances field references, identified by className and fieldName.

Note: If fieldName is declared in a superclass it will still match for subclasses. This is to support overriding of rules for specific cases. If two ReferenceMatcher match for the same fieldName but for different className in a class hierarchy, then the closest class in the hierarchy wins.

Constructors

InstanceFieldPattern [jvm]
constructor(className: String, fieldName: String)

Types

Name Summary
Companion [jvm]
object Companion

Functions

Name Summary
ignored [jvm]
fun ReferencePattern.ignored(patternApplies: (HeapGraph) -> Boolean = ALWAYS): IgnoredReferenceMatcher
leak [jvm]
fun ReferencePattern.leak(description: String = "", patternApplies: (HeapGraph) -> Boolean = ALWAYS): LibraryLeakReferenceMatcher
toString [jvm]
open override fun toString(): String

Properties

Name Summary
className [jvm]
val className: String
fieldName [jvm]
val fieldName: String