package a.i.b.a.c.g;

import a.i.b.a.c.g.i.e;
import a.i.b.a.c.g.j.a;
import a.i.b.a.c.g.z.b;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.lang.reflect.Method;

public class i$f<ContainingType extends q, Type> {
    final ContainingType BzS;
    final q BzT;
    final e BzU;
    final Class BzV;
    final Method BzW;
    final Type aze;

    i$f(ContainingType containingType, Type type, q qVar, e eVar, Class cls) {
        AppMethodBeat.i(121525);
        IllegalArgumentException illegalArgumentException;
        if (containingType == null) {
            illegalArgumentException = new IllegalArgumentException("Null containingTypeDefaultInstance");
            AppMethodBeat.o(121525);
            throw illegalArgumentException;
        } else if (eVar.BzP == z$a.BBb && qVar == null) {
            illegalArgumentException = new IllegalArgumentException("Null messageDefaultInstance");
            AppMethodBeat.o(121525);
            throw illegalArgumentException;
        } else {
            this.BzS = containingType;
            this.aze = type;
            this.BzT = qVar;
            this.BzU = eVar;
            this.BzV = cls;
            if (a.class.isAssignableFrom(cls)) {
                this.BzW = i.d(cls, "valueOf", new Class[]{Integer.TYPE});
                AppMethodBeat.o(121525);
                return;
            }
            this.BzW = null;
            AppMethodBeat.o(121525);
        }
    }

    /* Access modifiers changed, original: final */
    public final Object dM(Object obj) {
        AppMethodBeat.i(121526);
        if (this.BzU.BzP.BBj == b.BBt) {
            obj = i.d(this.BzW, new Object[]{(Integer) obj});
            AppMethodBeat.o(121526);
            return obj;
        }
        AppMethodBeat.o(121526);
        return obj;
    }

    /* Access modifiers changed, original: final */
    public final Object dN(Object obj) {
        AppMethodBeat.i(121527);
        if (this.BzU.BzP.BBj == b.BBt) {
            Integer valueOf = Integer.valueOf(((a) obj).edd());
            AppMethodBeat.o(121527);
            return valueOf;
        }
        AppMethodBeat.o(121527);
        return obj;
    }
}
