package g.e.b.g0;

import java.lang.reflect.Modifier;

/* JADX INFO: loaded from: classes.dex */
public abstract class e0 {
    public static void a(Class cls) {
        String strB = b(cls);
        if (strB != null) {
            throw new AssertionError(g.a.a.a.a.t("UnsafeAllocator is used for non-instantiable type: ", strB));
        }
    }

    public static String b(Class<?> cls) {
        StringBuilder sb;
        String str;
        int modifiers = cls.getModifiers();
        if (Modifier.isInterface(modifiers)) {
            sb = new StringBuilder();
            str = "Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: ";
        } else {
            if (!Modifier.isAbstract(modifiers)) {
                return null;
            }
            sb = new StringBuilder();
            str = "Abstract classes can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Class name: ";
        }
        sb.append(str);
        sb.append(cls.getName());
        return sb.toString();
    }

    public abstract <T> T c(Class<T> cls);
}
