- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
143 lines
4.4 KiB
Java
143 lines
4.4 KiB
Java
package com.mbridge.msdk.mbsignalcommon.c;
|
|
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class a {
|
|
private static InterfaceC0209a a;
|
|
|
|
/* renamed from: com.mbridge.msdk.mbsignalcommon.c.a$a, reason: collision with other inner class name */
|
|
public interface InterfaceC0209a {
|
|
boolean a(b.C0210a c0210a);
|
|
}
|
|
|
|
public static abstract class b {
|
|
|
|
/* renamed from: com.mbridge.msdk.mbsignalcommon.c.a$b$a, reason: collision with other inner class name */
|
|
public static class C0210a extends Throwable {
|
|
private Class<?> a;
|
|
private String b;
|
|
|
|
public final void a(Class<?> cls) {
|
|
this.a = cls;
|
|
}
|
|
|
|
public final void a(String str) {
|
|
this.b = str;
|
|
}
|
|
|
|
public C0210a(String str) {
|
|
super(str);
|
|
}
|
|
|
|
public C0210a(Exception exc) {
|
|
super(exc);
|
|
}
|
|
|
|
@Override // java.lang.Throwable
|
|
public final String toString() {
|
|
if (getCause() == null) {
|
|
return super.toString();
|
|
}
|
|
return C0210a.class.getName() + ": " + getCause();
|
|
}
|
|
}
|
|
}
|
|
|
|
public static class d {
|
|
protected final Method a;
|
|
|
|
public final Method a() {
|
|
return this.a;
|
|
}
|
|
|
|
public final Object a(Object obj, Object... objArr) throws IllegalArgumentException, InvocationTargetException {
|
|
Method method = this.a;
|
|
if (method == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
return method.invoke(obj, objArr);
|
|
} catch (Exception e) {
|
|
af.a("MappingedMethod", "invoke error:" + e.getMessage());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public d(Class<?> cls, String str, Class<?>[] clsArr, int i) throws b.C0210a {
|
|
Method method = null;
|
|
if (cls == null) {
|
|
return;
|
|
}
|
|
while (cls != Object.class && cls != null) {
|
|
try {
|
|
method = cls.getDeclaredMethod(str, clsArr);
|
|
break;
|
|
} catch (NoSuchMethodException e) {
|
|
if (MBridgeConstans.DEBUG && cls.getSuperclass() == Object.class) {
|
|
e.printStackTrace();
|
|
}
|
|
cls = cls.getSuperclass();
|
|
} catch (SecurityException e2) {
|
|
try {
|
|
try {
|
|
if (MBridgeConstans.DEBUG && cls.getSuperclass() == Object.class) {
|
|
e2.printStackTrace();
|
|
}
|
|
cls = cls.getSuperclass();
|
|
} catch (Exception e3) {
|
|
b.C0210a c0210a = new b.C0210a(e3);
|
|
c0210a.a(cls);
|
|
c0210a.a(str);
|
|
a.b(c0210a);
|
|
}
|
|
} finally {
|
|
this.a = method;
|
|
}
|
|
}
|
|
}
|
|
if (method != null) {
|
|
if (i > 0 && (method.getModifiers() & i) != i) {
|
|
a.b(new b.C0210a(method + " does not match modifiers: " + i));
|
|
}
|
|
method.setAccessible(true);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static class c<C> {
|
|
protected Class<C> a;
|
|
|
|
public final d a(String str, Class<?>... clsArr) throws b.C0210a {
|
|
return new d(this.a, str, clsArr, 0);
|
|
}
|
|
|
|
public c(Class<C> cls) {
|
|
this.a = cls;
|
|
}
|
|
}
|
|
|
|
public static <T> c<T> a(ClassLoader classLoader, String str) throws b.C0210a {
|
|
try {
|
|
return new c<>(classLoader.loadClass(str));
|
|
} catch (Exception e) {
|
|
b(new b.C0210a(e));
|
|
return new c<>(null);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static void b(b.C0210a c0210a) throws b.C0210a {
|
|
InterfaceC0209a interfaceC0209a = a;
|
|
if (interfaceC0209a == null) {
|
|
throw c0210a;
|
|
}
|
|
if (!interfaceC0209a.a(c0210a)) {
|
|
throw c0210a;
|
|
}
|
|
}
|
|
}
|