package o; import android.app.Application; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.Collections; import java.util.List; /* loaded from: classes.dex */ public final class Plq { private static final List> a; private static final List> b; public static final T c(Class cls, Constructor constructor, Object... objArr) { C14957gcv.e(cls, ""); C14957gcv.e(constructor, ""); C14957gcv.e(objArr, ""); try { return constructor.newInstance(Arrays.copyOf(objArr, objArr.length)); } catch (IllegalAccessException e) { throw new RuntimeException("Failed to access ".concat(String.valueOf(cls)), e); } catch (InstantiationException e2) { StringBuilder sb = new StringBuilder("A "); sb.append(cls); sb.append(" cannot be instantiated."); throw new RuntimeException(sb.toString(), e2); } catch (InvocationTargetException e3) { throw new RuntimeException("An exception happened in constructor of ".concat(String.valueOf(cls)), e3.getCause()); } } static { Class[] clsArr = {Application.class, NER.class}; C14957gcv.e(clsArr, ""); C14957gcv.e(clsArr, ""); List> asList = Arrays.asList(clsArr); C14957gcv.c(asList, ""); a = asList; List> singletonList = Collections.singletonList(NER.class); C14957gcv.c(singletonList, ""); b = singletonList; } public static final Constructor d(Class cls, List> list) { C14957gcv.e(cls, ""); C14957gcv.e(list, ""); Object[] constructors = cls.getConstructors(); C14957gcv.c(constructors, ""); for (Object obj : constructors) { Constructor constructor = (Constructor) obj; Class[] parameterTypes = constructor.getParameterTypes(); C14957gcv.c(parameterTypes, ""); List d = C14875gap.d(parameterTypes); if (C14957gcv.b(list, d)) { if (constructor != null) { return constructor; } throw new NullPointerException("null cannot be cast to non-null type java.lang.reflect.Constructor"); } if (list.size() == d.size() && d.containsAll(list)) { StringBuilder sb = new StringBuilder("Class "); sb.append(cls.getSimpleName()); sb.append(" must have parameters in the proper order: "); sb.append(list); throw new UnsupportedOperationException(sb.toString()); } } return null; } public static final /* synthetic */ List c() { return b; } public static final /* synthetic */ List e() { return a; } }