package d.f.a.r2.j3;

import com.google.gson.internal.C$Gson$Types;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import okhttp3.Request;
import okhttp3.Response;

/* JADX INFO: compiled from: BaseCallback.java */
/* JADX INFO: loaded from: classes.dex */
public abstract class c<T> {
    public Type mType = getSuperclassTypeParameter(getClass());

    public static Type getSuperclassTypeParameter(Class<?> cls) {
        return C$Gson$Types.canonicalize(((ParameterizedType) cls.getGenericSuperclass()).getActualTypeArguments()[0]);
    }

    public abstract void onBeforeRequest(Request request);

    public abstract void onError(Response response, int i2, Exception exc);

    public abstract void onFailure(Request request, Exception exc);

    public abstract void onResponse(Response response);

    public abstract void onSuccess(Response response, T t);
}
