Skip to content
🤔 Documentation issue? Report it

//leakcanary/shark/AndroidReferenceMatchers/Companion

Companion

object Companion

Functions

Name Summary
buildKnownReferences @JvmStatic
fun buildKnownReferences(referenceMatchers: Set<AndroidReferenceMatchers>): List<ReferenceMatcher>
Builds a list of ReferenceMatcher from the referenceMatchers set of AndroidReferenceMatchers.
ignoredInstanceField @JvmStatic
fun ignoredInstanceField(className: String, fieldName: String): IgnoredReferenceMatcher
Creates a IgnoredReferenceMatcher that matches a InstanceFieldPattern.
ignoredJavaLocal @JvmStatic
fun ignoredJavaLocal(threadName: String): IgnoredReferenceMatcher
Creates a IgnoredReferenceMatcher that matches a JavaLocalPattern.
instanceFieldLeak @JvmStatic
fun instanceFieldLeak(className: String, fieldName: String, description: String = "", patternApplies: AndroidBuildMirror.() -> Boolean = ALWAYS): LibraryLeakReferenceMatcher
Creates a LibraryLeakReferenceMatcher that matches a InstanceFieldPattern. description should convey what we know about this library leak.
nativeGlobalVariableLeak @JvmStatic
fun nativeGlobalVariableLeak(className: String, description: String = "", patternApplies: AndroidBuildMirror.() -> Boolean = ALWAYS): LibraryLeakReferenceMatcher
staticFieldLeak @JvmStatic
fun staticFieldLeak(className: String, fieldName: String, description: String = "", patternApplies: AndroidBuildMirror.() -> Boolean = ALWAYS): LibraryLeakReferenceMatcher
Creates a LibraryLeakReferenceMatcher that matches a StaticFieldPattern. description should convey what we know about this library leak.

Properties

Name Summary
appDefaults @JvmStatic
val appDefaults: List<ReferenceMatcher>
HMD_GLOBAL const val HMD_GLOBAL: String
HUAWEI const val HUAWEI: String
ignoredReferencesOnly @JvmStatic
val ignoredReferencesOnly: List<ReferenceMatcher>
Returns a list of ReferenceMatcher that only contains IgnoredReferenceMatcher and no LibraryLeakReferenceMatcher.
INFINIX const val INFINIX: String
LENOVO const val LENOVO: String
LG const val LG: String
MEIZU const val MEIZU: String
MOTOROLA const val MOTOROLA: String
NVIDIA const val NVIDIA: String
ONE_PLUS const val ONE_PLUS: String
RAZER const val RAZER: String
REALME const val REALME: String
SAMSUNG const val SAMSUNG: String
SHARP const val SHARP: String
TES const val TES: String
VIVO const val VIVO: String
XIAOMI const val XIAOMI: String