what-the-bank/sources/o/C13133fRo.java

62 lines
2.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
/* renamed from: o.fRo, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C13133fRo implements InterfaceC13123fRe {
private static final Class<? extends Object>[] b;
private static final Class<? extends Object>[] e;
/* renamed from: o.fRo$HBt */
/* loaded from: classes.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
static {
new HBt((byte) 0);
e = new Class[]{Context.class};
b = new Class[]{Context.class, AttributeSet.class};
}
@Override // o.InterfaceC13123fRe
public final View aCR_(View view, String str, Context context, AttributeSet attributeSet) {
Constructor constructor;
Object[] objArr;
C14957gcv.b((Object) str, "");
C14957gcv.b((Object) context, "");
try {
Class<? extends U> asSubclass = Class.forName(str).asSubclass(View.class);
try {
Class<? extends Object>[] clsArr = b;
constructor = asSubclass.getConstructor((Class[]) Arrays.copyOf(clsArr, clsArr.length));
C14957gcv.a(constructor, "");
objArr = new Object[]{context, attributeSet};
} catch (NoSuchMethodException unused) {
Class<? extends Object>[] clsArr2 = e;
constructor = asSubclass.getConstructor((Class[]) Arrays.copyOf(clsArr2, clsArr2.length));
C14957gcv.a(constructor, "");
objArr = new Context[]{context};
}
constructor.setAccessible(true);
return (View) constructor.newInstance(Arrays.copyOf(objArr, objArr.length));
} catch (Exception e2) {
if ((e2 instanceof ClassNotFoundException) || (e2 instanceof NoSuchMethodException) || (e2 instanceof IllegalAccessException) || (e2 instanceof InstantiationException) || (e2 instanceof InvocationTargetException)) {
return null;
}
throw e2;
}
}
}