package androidx.fragment.app;

import androidx.fragment.app.Fragment;
import p037m.C1457g;

/* renamed from: androidx.fragment.app.i */
/* loaded from: classes.dex */
public class C0315i {

    /* renamed from: a */
    public static final C1457g<ClassLoader, C1457g<String, Class<?>>> f1326a = new C1457g<>();

    /* renamed from: b */
    public static boolean m4082b(ClassLoader classLoader, String str) {
        try {
            return Fragment.class.isAssignableFrom(m4081c(classLoader, str));
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

    /* renamed from: c */
    public static Class<?> m4081c(ClassLoader classLoader, String str) {
        C1457g<ClassLoader, C1457g<String, Class<?>>> c1457g = f1326a;
        C1457g<String, Class<?>> c1457g2 = c1457g.get(classLoader);
        if (c1457g2 == null) {
            c1457g2 = new C1457g<>();
            c1457g.put(classLoader, c1457g2);
        }
        Class<?> cls = c1457g2.get(str);
        if (cls == null) {
            Class<?> cls2 = Class.forName(str, false, classLoader);
            c1457g2.put(str, cls2);
            return cls2;
        }
        return cls;
    }

    /* renamed from: d */
    public static Class<? extends Fragment> m4080d(ClassLoader classLoader, String str) {
        try {
            return m4081c(classLoader, str);
        } catch (ClassCastException e) {
            throw new Fragment.C0272f("Unable to instantiate fragment " + str + ": make sure class is a valid subclass of Fragment", e);
        } catch (ClassNotFoundException e2) {
            throw new Fragment.C0272f("Unable to instantiate fragment " + str + ": make sure class name exists", e2);
        }
    }

    /* renamed from: a */
    public Fragment mo3937a(ClassLoader classLoader, String str) {
        throw null;
    }
}