package com.google.android.gms.dynamite;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.util.DynamiteApi;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import javax.annotation.concurrent.GuardedBy;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.C4196;
import p138.p176.p177.p242.p256.BinderC4341;
import p138.p176.p177.p242.p256.InterfaceC4338;
import p138.p176.p177.p242.p257.C4342;
import p138.p176.p177.p242.p257.C4343;
import p138.p176.p177.p242.p257.C4344;
import p138.p176.p177.p242.p257.C4345;
import p138.p176.p177.p242.p257.C4346;
import p138.p176.p177.p242.p257.C4348;
import p138.p176.p177.p242.p257.C4350;
import p138.p176.p177.p242.p257.InterfaceC4347;
import p138.p176.p177.p242.p257.InterfaceC4349;

/* JADX INFO: loaded from: classes.dex */
public final class DynamiteModule {

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    @GuardedBy("DynamiteModule.class")
    public static Boolean f2099 = null;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    @GuardedBy("DynamiteModule.class")
    public static InterfaceC4347 f2100 = null;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    @GuardedBy("DynamiteModule.class")
    public static InterfaceC4349 f2101 = null;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    @GuardedBy("DynamiteModule.class")
    public static String f2102 = null;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    @GuardedBy("DynamiteModule.class")
    public static int f2103 = -1;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public static final ThreadLocal<C0332> f2104 = new ThreadLocal<>();

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public static final InterfaceC0329.InterfaceC0330 f2105 = new C4342();

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public static final InterfaceC0329 f2106 = new C4343();

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public static final InterfaceC0329 f2107 = new C4344();

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public static final InterfaceC0329 f2108 = new C4345();

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Context f2109;

    @DynamiteApi
    public static class DynamiteLoaderClassLoader {

        @GuardedBy("DynamiteLoaderClassLoader.class")
        public static ClassLoader sClassLoader;
    }

    public static class LoadingException extends Exception {
        public /* synthetic */ LoadingException(String str, Throwable th, C4342 c4342) {
            super(str, th);
        }

        public /* synthetic */ LoadingException(String str, C4342 c4342) {
            super(str);
        }
    }

    /* JADX INFO: renamed from: com.google.android.gms.dynamite.DynamiteModule$֏, reason: contains not printable characters */
    public interface InterfaceC0329 {

        /* JADX INFO: renamed from: com.google.android.gms.dynamite.DynamiteModule$֏$֏, reason: contains not printable characters */
        public interface InterfaceC0330 {
            /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
            int mo1345(Context context, String str);

            /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
            int mo1346(Context context, String str, boolean z);
        }

        /* JADX INFO: renamed from: com.google.android.gms.dynamite.DynamiteModule$֏$ؠ, reason: contains not printable characters */
        public static class C0331 {

            /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
            public int f2110 = 0;

            /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
            public int f2111 = 0;

            /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
            public int f2112 = 0;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        C0331 mo1344(Context context, String str, InterfaceC0330 interfaceC0330);
    }

    /* JADX INFO: renamed from: com.google.android.gms.dynamite.DynamiteModule$ؠ, reason: contains not printable characters */
    public static class C0332 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public Cursor f2113;

        public C0332() {
        }

        public /* synthetic */ C0332(C4342 c4342) {
        }
    }

    /* JADX INFO: renamed from: com.google.android.gms.dynamite.DynamiteModule$ހ, reason: contains not printable characters */
    public static class C0333 implements InterfaceC0329.InterfaceC0330 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final int f2114;

        public C0333(int i) {
            this.f2114 = i;
        }

        @Override // com.google.android.gms.dynamite.DynamiteModule.InterfaceC0329.InterfaceC0330
        /* JADX INFO: renamed from: ֏ */
        public final int mo1345(Context context, String str) {
            return this.f2114;
        }

        @Override // com.google.android.gms.dynamite.DynamiteModule.InterfaceC0329.InterfaceC0330
        /* JADX INFO: renamed from: ֏ */
        public final int mo1346(Context context, String str, boolean z) {
            return 0;
        }
    }

    public DynamiteModule(Context context) {
        C0567.m1910(context);
        this.f2109 = context;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m1332(Context context, String str) {
        try {
            ClassLoader classLoader = context.getApplicationContext().getClassLoader();
            StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 61);
            sb.append("com.google.android.gms.dynamite.descriptors.");
            sb.append(str);
            sb.append(".ModuleDescriptor");
            Class<?> clsLoadClass = classLoader.loadClass(sb.toString());
            Field declaredField = clsLoadClass.getDeclaredField("MODULE_ID");
            Field declaredField2 = clsLoadClass.getDeclaredField("MODULE_VERSION");
            if (declaredField.get(null).equals(str)) {
                return declaredField2.getInt(null);
            }
            String strValueOf = String.valueOf(declaredField.get(null));
            StringBuilder sb2 = new StringBuilder(strValueOf.length() + 51 + String.valueOf(str).length());
            sb2.append("Module descriptor id '");
            sb2.append(strValueOf);
            sb2.append("' didn't match expected id '");
            sb2.append(str);
            sb2.append("'");
            Log.e("DynamiteModule", sb2.toString());
            return 0;
        } catch (ClassNotFoundException unused) {
            StringBuilder sb3 = new StringBuilder(C2803.m4895(str, 45));
            sb3.append("Local module descriptor class for ");
            sb3.append(str);
            sb3.append(" not found.");
            Log.w("DynamiteModule", sb3.toString());
            return 0;
        } catch (Exception e) {
            String strValueOf2 = String.valueOf(e.getMessage());
            Log.e("DynamiteModule", strValueOf2.length() != 0 ? "Failed to load module descriptor class: ".concat(strValueOf2) : new String("Failed to load module descriptor class: "));
            return 0;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m1333(Context context, String str, boolean z) {
        Class<?> clsLoadClass;
        Field declaredField;
        Boolean bool;
        try {
            synchronized (DynamiteModule.class) {
                Boolean bool2 = f2099;
                if (bool2 == null) {
                    try {
                        clsLoadClass = context.getApplicationContext().getClassLoader().loadClass(DynamiteLoaderClassLoader.class.getName());
                        declaredField = clsLoadClass.getDeclaredField("sClassLoader");
                    } catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException e) {
                        String strValueOf = String.valueOf(e);
                        StringBuilder sb = new StringBuilder(strValueOf.length() + 30);
                        sb.append("Failed to load module via V2: ");
                        sb.append(strValueOf);
                        Log.w("DynamiteModule", sb.toString());
                        bool2 = Boolean.FALSE;
                    }
                    synchronized (clsLoadClass) {
                        ClassLoader classLoader = (ClassLoader) declaredField.get(null);
                        if (classLoader != null) {
                            if (classLoader == ClassLoader.getSystemClassLoader()) {
                                bool = Boolean.FALSE;
                            } else {
                                try {
                                    m1338(classLoader);
                                } catch (LoadingException unused) {
                                }
                                bool = Boolean.TRUE;
                            }
                        } else if ("com.google.android.gms".equals(context.getApplicationContext().getPackageName())) {
                            declaredField.set(null, ClassLoader.getSystemClassLoader());
                            bool = Boolean.FALSE;
                        } else {
                            try {
                                int iM1342 = m1342(context, str, z);
                                if (f2102 != null && !f2102.isEmpty()) {
                                    C4346 c4346 = new C4346(f2102, ClassLoader.getSystemClassLoader());
                                    m1338(c4346);
                                    declaredField.set(null, c4346);
                                    f2099 = Boolean.TRUE;
                                    return iM1342;
                                }
                                return iM1342;
                            } catch (LoadingException unused2) {
                                declaredField.set(null, ClassLoader.getSystemClassLoader());
                                bool = Boolean.FALSE;
                            }
                        }
                        bool2 = bool;
                        f2099 = bool2;
                    }
                }
                if (!bool2.booleanValue()) {
                    return m1339(context, str, z);
                }
                try {
                    return m1342(context, str, z);
                } catch (LoadingException e2) {
                    String strValueOf2 = String.valueOf(e2.getMessage());
                    Log.w("DynamiteModule", strValueOf2.length() != 0 ? "Failed to retrieve remote module version: ".concat(strValueOf2) : new String("Failed to retrieve remote module version: "));
                    return 0;
                }
            }
        } catch (Throwable th) {
            try {
                C0567.m1910(context);
                C0567.m1910(th);
            } catch (Exception e3) {
                Log.e("CrashUtils", "Error adding exception to DropBox!", e3);
            }
            throw th;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static DynamiteModule m1334(Context context, InterfaceC0329 interfaceC0329, String str) {
        C0332 c0332 = f2104.get();
        C4342 c4342 = null;
        C0332 c03322 = new C0332(c4342);
        f2104.set(c03322);
        try {
            InterfaceC0329.C0331 c0331Mo1344 = interfaceC0329.mo1344(context, str, f2105);
            int i = c0331Mo1344.f2110;
            int i2 = c0331Mo1344.f2111;
            StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 68 + String.valueOf(str).length());
            sb.append("Considering local module ");
            sb.append(str);
            sb.append(":");
            sb.append(i);
            sb.append(" and remote module ");
            sb.append(str);
            sb.append(":");
            sb.append(i2);
            Log.i("DynamiteModule", sb.toString());
            if (c0331Mo1344.f2112 == 0 || ((c0331Mo1344.f2112 == -1 && c0331Mo1344.f2110 == 0) || (c0331Mo1344.f2112 == 1 && c0331Mo1344.f2111 == 0))) {
                int i3 = c0331Mo1344.f2110;
                int i4 = c0331Mo1344.f2111;
                StringBuilder sb2 = new StringBuilder(91);
                sb2.append("No acceptable module found. Local version is ");
                sb2.append(i3);
                sb2.append(" and remote version is ");
                sb2.append(i4);
                sb2.append(".");
                throw new LoadingException(sb2.toString(), c4342);
            }
            if (c0331Mo1344.f2112 == -1) {
                DynamiteModule dynamiteModuleM1340 = m1340(context, str);
                Cursor cursor = c03322.f2113;
                if (cursor != null) {
                    cursor.close();
                }
                f2104.set(c0332);
                return dynamiteModuleM1340;
            }
            if (c0331Mo1344.f2112 != 1) {
                int i5 = c0331Mo1344.f2112;
                StringBuilder sb3 = new StringBuilder(47);
                sb3.append("VersionPolicy returned invalid code:");
                sb3.append(i5);
                throw new LoadingException(sb3.toString(), c4342);
            }
            try {
                DynamiteModule dynamiteModuleM1335 = m1335(context, str, c0331Mo1344.f2111);
                Cursor cursor2 = c03322.f2113;
                if (cursor2 != null) {
                    cursor2.close();
                }
                f2104.set(c0332);
                return dynamiteModuleM1335;
            } catch (LoadingException e) {
                String strValueOf = String.valueOf(e.getMessage());
                Log.w("DynamiteModule", strValueOf.length() != 0 ? "Failed to load remote module: ".concat(strValueOf) : new String("Failed to load remote module: "));
                if (c0331Mo1344.f2110 == 0 || interfaceC0329.mo1344(context, str, new C0333(c0331Mo1344.f2110)).f2112 != -1) {
                    throw new LoadingException("Remote load failed. No local fallback found.", e, c4342);
                }
                DynamiteModule dynamiteModuleM13402 = m1340(context, str);
                Cursor cursor3 = c03322.f2113;
                if (cursor3 != null) {
                    cursor3.close();
                }
                f2104.set(c0332);
                return dynamiteModuleM13402;
            }
        } catch (Throwable th) {
            Cursor cursor4 = c03322.f2113;
            if (cursor4 != null) {
                cursor4.close();
            }
            f2104.set(c0332);
            throw th;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static DynamiteModule m1335(Context context, String str, int i) throws LoadingException {
        Boolean bool;
        InterfaceC4338 interfaceC4338Mo7241;
        C4342 c4342 = null;
        try {
            synchronized (DynamiteModule.class) {
                bool = f2099;
            }
            if (bool == null) {
                throw new LoadingException("Failed to determine which loading route to use.", c4342);
            }
            if (bool.booleanValue()) {
                return m1341(context, str, i);
            }
            StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 51);
            sb.append("Selected remote version of ");
            sb.append(str);
            sb.append(", version >= ");
            sb.append(i);
            Log.i("DynamiteModule", sb.toString());
            InterfaceC4347 interfaceC4347M1337 = m1337(context);
            if (interfaceC4347M1337 == null) {
                throw new LoadingException("Failed to create IDynamiteLoader.", c4342);
            }
            if (interfaceC4347M1337.mo7242() >= 2) {
                interfaceC4338Mo7241 = interfaceC4347M1337.mo7239(new BinderC4341(context), str, i);
            } else {
                Log.w("DynamiteModule", "Dynamite loader version < 2, falling back to createModuleContext");
                interfaceC4338Mo7241 = interfaceC4347M1337.mo7241(new BinderC4341(context), str, i);
            }
            if (BinderC4341.m7237(interfaceC4338Mo7241) != null) {
                return new DynamiteModule((Context) BinderC4341.m7237(interfaceC4338Mo7241));
            }
            throw new LoadingException("Failed to load remote module.", c4342);
        } catch (RemoteException e) {
            throw new LoadingException("Failed to load remote module.", e, c4342);
        } catch (LoadingException e2) {
            throw e2;
        } catch (Throwable th) {
            try {
                C0567.m1910(context);
                C0567.m1910(th);
            } catch (Exception e3) {
                Log.e("CrashUtils", "Error adding exception to DropBox!", e3);
            }
            throw new LoadingException("Failed to load remote module.", th, c4342);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static Boolean m1336() {
        Boolean boolValueOf;
        synchronized (DynamiteModule.class) {
            boolValueOf = Boolean.valueOf(f2103 >= 2);
        }
        return boolValueOf;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static InterfaceC4347 m1337(Context context) {
        InterfaceC4347 c4348;
        synchronized (DynamiteModule.class) {
            if (f2100 != null) {
                return f2100;
            }
            if (C4196.f13406.mo6843(context) != 0) {
                return null;
            }
            try {
                IBinder iBinder = (IBinder) context.createPackageContext("com.google.android.gms", 3).getClassLoader().loadClass("com.google.android.gms.chimera.container.DynamiteLoaderImpl").newInstance();
                if (iBinder == null) {
                    c4348 = null;
                } else {
                    IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.dynamite.IDynamiteLoader");
                    c4348 = iInterfaceQueryLocalInterface instanceof InterfaceC4347 ? (InterfaceC4347) iInterfaceQueryLocalInterface : new C4348(iBinder);
                }
                if (c4348 != null) {
                    f2100 = c4348;
                    return c4348;
                }
            } catch (Exception e) {
                String strValueOf = String.valueOf(e.getMessage());
                Log.e("DynamiteModule", strValueOf.length() != 0 ? "Failed to load IDynamiteLoader from GmsCore: ".concat(strValueOf) : new String("Failed to load IDynamiteLoader from GmsCore: "));
            }
            return null;
        }
    }

    @GuardedBy("DynamiteModule.class")
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m1338(ClassLoader classLoader) throws LoadingException {
        InterfaceC4349 c4350;
        C4342 c4342 = null;
        try {
            IBinder iBinder = (IBinder) classLoader.loadClass("com.google.android.gms.dynamiteloader.DynamiteLoaderV2").getConstructor(new Class[0]).newInstance(new Object[0]);
            if (iBinder == null) {
                c4350 = null;
            } else {
                IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.dynamite.IDynamiteLoaderV2");
                c4350 = iInterfaceQueryLocalInterface instanceof InterfaceC4349 ? (InterfaceC4349) iInterfaceQueryLocalInterface : new C4350(iBinder);
            }
            f2101 = c4350;
        } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) {
            throw new LoadingException("Failed to instantiate dynamite loader", e, c4342);
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m1339(Context context, String str, boolean z) {
        InterfaceC4347 interfaceC4347M1337 = m1337(context);
        if (interfaceC4347M1337 == null) {
            return 0;
        }
        try {
            if (interfaceC4347M1337.mo7242() >= 2) {
                return interfaceC4347M1337.mo7238(new BinderC4341(context), str, z);
            }
            Log.w("DynamiteModule", "IDynamite loader version < 2, falling back to getModuleVersion2");
            return interfaceC4347M1337.mo7240(new BinderC4341(context), str, z);
        } catch (RemoteException e) {
            String strValueOf = String.valueOf(e.getMessage());
            Log.w("DynamiteModule", strValueOf.length() != 0 ? "Failed to retrieve remote module version: ".concat(strValueOf) : new String("Failed to retrieve remote module version: "));
            return 0;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static DynamiteModule m1340(Context context, String str) {
        String strValueOf = String.valueOf(str);
        Log.i("DynamiteModule", strValueOf.length() != 0 ? "Selected local version of ".concat(strValueOf) : new String("Selected local version of "));
        return new DynamiteModule(context.getApplicationContext());
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static DynamiteModule m1341(Context context, String str, int i) throws LoadingException {
        InterfaceC4349 interfaceC4349;
        InterfaceC4338 interfaceC4338Mo7243;
        StringBuilder sb = new StringBuilder(C2803.m4895(str, 51));
        sb.append("Selected remote version of ");
        sb.append(str);
        sb.append(", version >= ");
        sb.append(i);
        Log.i("DynamiteModule", sb.toString());
        synchronized (DynamiteModule.class) {
            interfaceC4349 = f2101;
        }
        C4342 c4342 = null;
        if (interfaceC4349 == null) {
            throw new LoadingException("DynamiteLoaderV2 was not cached.", c4342);
        }
        C0332 c0332 = f2104.get();
        if (c0332 == null || c0332.f2113 == null) {
            throw new LoadingException("No result cursor", c4342);
        }
        Context applicationContext = context.getApplicationContext();
        Cursor cursor = c0332.f2113;
        new BinderC4341(null);
        if (m1336().booleanValue()) {
            Log.v("DynamiteModule", "Dynamite loader version >= 2, using loadModule2NoCrashUtils");
            interfaceC4338Mo7243 = interfaceC4349.mo7244(new BinderC4341(applicationContext), str, i, new BinderC4341(cursor));
        } else {
            Log.w("DynamiteModule", "Dynamite loader version < 2, falling back to loadModule2");
            interfaceC4338Mo7243 = interfaceC4349.mo7243(new BinderC4341(applicationContext), str, i, new BinderC4341(cursor));
        }
        Context context2 = (Context) BinderC4341.m7237(interfaceC4338Mo7243);
        if (context2 != null) {
            return new DynamiteModule(context2);
        }
        throw new LoadingException("Failed to get module context", c4342);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:29:0x007c  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00b0  */
    /* JADX WARN: Type inference failed for: r0v0, types: [ދ.ހ.֏.ހ.ނ.֏] */
    /* JADX WARN: Type inference failed for: r0v1, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r0v2 */
    /* JADX WARN: Type inference failed for: r0v3 */
    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static int m1342(Context context, String str, boolean z) throws Throwable {
        Cursor cursor;
        ?? r0 = 0;
        Cursor cursor2 = null;
        try {
            ContentResolver contentResolver = context.getContentResolver();
            String str2 = z ? "api_force_staging" : "api";
            StringBuilder sb = new StringBuilder(str2.length() + 42 + String.valueOf(str).length());
            sb.append("content://com.google.android.gms.chimera/");
            sb.append(str2);
            sb.append("/");
            sb.append(str);
            Cursor cursorQuery = contentResolver.query(Uri.parse(sb.toString()), null, null, null, null);
            if (cursorQuery != null) {
                try {
                    if (cursorQuery.moveToFirst()) {
                        int i = cursorQuery.getInt(0);
                        if (i > 0) {
                            synchronized (DynamiteModule.class) {
                                f2102 = cursorQuery.getString(2);
                                int columnIndex = cursorQuery.getColumnIndex("loaderVersion");
                                if (columnIndex >= 0) {
                                    f2103 = cursorQuery.getInt(columnIndex);
                                }
                            }
                            C0332 c0332 = f2104.get();
                            if (c0332 == null || c0332.f2113 != null) {
                                cursor2 = cursorQuery;
                            } else {
                                c0332.f2113 = cursorQuery;
                            }
                        }
                        if (cursor2 != null) {
                            cursor2.close();
                        }
                        return i;
                    }
                } catch (Exception e) {
                    cursor = cursorQuery;
                    e = e;
                    try {
                        if (e instanceof LoadingException) {
                            throw e;
                        }
                        throw new LoadingException("V2 version check failed", e, r0);
                    } catch (Throwable th) {
                        th = th;
                        r0 = cursor;
                        if (r0 != 0) {
                            r0.close();
                        }
                        throw th;
                    }
                } catch (Throwable th2) {
                    r0 = cursorQuery;
                    th = th2;
                    if (r0 != 0) {
                    }
                    throw th;
                }
            }
            Log.w("DynamiteModule", "Failed to retrieve remote module version.");
            throw new LoadingException("Failed to connect to dynamite module ContentResolver.", r0);
        } catch (Exception e2) {
            e = e2;
            cursor = null;
        } catch (Throwable th3) {
            th = th3;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final IBinder m1343(String str) throws LoadingException {
        try {
            return (IBinder) this.f2109.getClassLoader().loadClass(str).newInstance();
        } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
            String strValueOf = String.valueOf(str);
            throw new LoadingException(strValueOf.length() != 0 ? "Failed to instantiate module class: ".concat(strValueOf) : new String("Failed to instantiate module class: "), e, null);
        }
    }
}
