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

47 lines
1.6 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package d0.w.h.a;
import c.d.b.a.a;
import d0.z.d.m;
import java.lang.reflect.Field;
/* compiled from: DebugMetadata.kt */
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-08-04 22:02:59 +00:00
String moduleName = h.f2710c.getModuleName(aVar);
2021-06-27 20:44:35 +00:00
if (moduleName == null) {
str = eVar.c();
} else {
str = moduleName + '/' + eVar.c();
}
return new StackTraceElement(str, eVar.m(), eVar.f(), i2);
}
2021-07-27 04:36:47 +00:00
throw new IllegalStateException(a.n("Debug metadata version mismatch. Expected: ", 1, ", got ", v, ". Please update the Kotlin standard library.").toString());
2021-06-27 20:44:35 +00:00
}
}