package d.m;

import android.app.Application;
import java.lang.reflect.InvocationTargetException;

/* JADX INFO: loaded from: classes.dex */
public class t extends w {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static t f3210b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Application f3211c;

    public t(Application application) {
        this.f3211c = application;
    }

    @Override // d.m.w, d.m.u
    public <T extends s> T a(Class<T> cls) {
        if (!a.class.isAssignableFrom(cls)) {
            return (T) super.a(cls);
        }
        try {
            return cls.getConstructor(Application.class).newInstance(this.f3211c);
        } catch (IllegalAccessException e2) {
            throw new RuntimeException("Cannot create an instance of " + cls, e2);
        } catch (InstantiationException e3) {
            throw new RuntimeException("Cannot create an instance of " + cls, e3);
        } catch (NoSuchMethodException e4) {
            throw new RuntimeException("Cannot create an instance of " + cls, e4);
        } catch (InvocationTargetException e5) {
            throw new RuntimeException("Cannot create an instance of " + cls, e5);
        }
    }
}
