what-the-bank/sources/io/github/inflationx/calligraphy3/ReflectionUtils.java

35 lines
988 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package io.github.inflationx.calligraphy3;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes6.dex */
class ReflectionUtils {
private static final String TAG = "ReflectionUtils";
ReflectionUtils() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Method getMethod(Class cls, String str) {
for (Method method : cls.getMethods()) {
if (method.getName().equals(str)) {
method.setAccessible(true);
return method;
}
}
return null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static void invokeMethod(Object obj, Method method, Object... objArr) {
if (method == null) {
return;
}
try {
method.invoke(obj, objArr);
} catch (IllegalAccessException | InvocationTargetException unused) {
}
}
}