jimu-decompiled/sources/com/squareup/leakcanary/LeakReference.java
2025-05-13 19:24:51 +02:00

72 lines
2.7 KiB
Java

package com.squareup.leakcanary;
import com.squareup.leakcanary.LeakTraceElement;
import java.io.Serializable;
/* loaded from: classes.dex */
public final class LeakReference implements Serializable {
public final String name;
public final LeakTraceElement.Type type;
public final String value;
/* renamed from: com.squareup.leakcanary.LeakReference$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type = new int[LeakTraceElement.Type.values().length];
static {
try {
$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[LeakTraceElement.Type.ARRAY_ENTRY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[LeakTraceElement.Type.STATIC_FIELD.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[LeakTraceElement.Type.INSTANCE_FIELD.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[LeakTraceElement.Type.LOCAL.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
public LeakReference(LeakTraceElement.Type type, String str, String str2) {
this.type = type;
this.name = str;
this.value = str2;
}
public String getDisplayName() {
int i = AnonymousClass1.$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[this.type.ordinal()];
if (i == 1) {
return "[" + this.name + "]";
}
if (i == 2 || i == 3) {
return this.name;
}
if (i == 4) {
return "<Java Local>";
}
throw new IllegalStateException("Unexpected type " + this.type + " name = " + this.name + " value = " + this.value);
}
public String toString() {
int i = AnonymousClass1.$SwitchMap$com$squareup$leakcanary$LeakTraceElement$Type[this.type.ordinal()];
if (i != 1) {
if (i == 2) {
return "static " + getDisplayName() + " = " + this.value;
}
if (i != 3) {
if (i == 4) {
return getDisplayName();
}
throw new IllegalStateException("Unexpected type " + this.type + " name = " + this.name + " value = " + this.value);
}
}
return getDisplayName() + " = " + this.value;
}
}