discord-jadx/app/src/main/java/d0/w/i/a/f.java

48 lines
1.7 KiB
Java
Raw Normal View History

2021-11-08 18:25:28 +00:00
package d0.w.i.a;
2021-06-27 20:44:35 +00:00
import com.discord.widgets.chat.input.MentionUtilsKt;
2021-11-08 18:25:28 +00:00
import d0.z.d.m;
2021-06-27 20:44:35 +00:00
import java.lang.reflect.Field;
/* compiled from: DebugMetadata.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes3.dex */
2021-06-27 20:44:35 +00:00
public final class f {
public static final StackTraceElement getStackTraceElement(a aVar) {
int i;
String str;
m.checkNotNullParameter(aVar, "$this$getStackTraceElementImpl");
e eVar = (e) aVar.getClass().getAnnotation(e.class);
Object obj = null;
if (eVar == null) {
return null;
}
int v = eVar.v();
if (v <= 1) {
int i2 = -1;
try {
Field declaredField = aVar.getClass().getDeclaredField("label");
m.checkNotNullExpressionValue(declaredField, "field");
declaredField.setAccessible(true);
Object obj2 = declaredField.get(aVar);
if (obj2 instanceof Integer) {
obj = obj2;
}
Integer num = (Integer) obj;
i = (num != null ? num.intValue() : 0) - 1;
} catch (Exception unused) {
i = -1;
}
if (i >= 0) {
i2 = eVar.l()[i];
}
2021-12-21 23:37:30 +00:00
String moduleName = h.c.getModuleName(aVar);
2021-06-27 20:44:35 +00:00
if (moduleName == null) {
str = eVar.c();
} else {
str = moduleName + MentionUtilsKt.SLASH_CHAR + eVar.c();
2021-06-27 20:44:35 +00:00
}
return new StackTraceElement(str, eVar.m(), eVar.f(), i2);
}
2021-11-08 18:25:28 +00:00
throw new IllegalStateException(("Debug metadata version mismatch. Expected: 1, got " + v + ". Please update the Kotlin standard library.").toString());
2021-06-27 20:44:35 +00:00
}
}