package d.c.a;

import com.codezjx.andlinker.BaseTypeWrapper;
import com.codezjx.andlinker.CallbackTypeWrapper;
import com.codezjx.andlinker.InOutTypeWrapper;
import com.codezjx.andlinker.InTypeWrapper;
import com.codezjx.andlinker.OutTypeWrapper;
import java.lang.annotation.Annotation;

/* JADX INFO: compiled from: ParameterHandler.java */
/* JADX INFO: loaded from: classes.dex */
public interface o<T> {

    /* JADX INFO: compiled from: ParameterHandler.java */
    public static final class a<T> implements o<T> {
        public Class<?> a;

        public a(Class<?> cls) {
            this.a = cls;
        }

        @Override // d.c.a.o
        public void a(q qVar, T t, int i2) {
            StringBuilder sbB = d.b.a.a.a.B("ParameterHandler mParamType:");
            sbB.append(this.a);
            sbB.append(" value:");
            sbB.append(t);
            l.a("CallbackHandler", sbB.toString());
            qVar.a(i2, new CallbackTypeWrapper(this.a.getSimpleName()));
        }
    }

    /* JADX INFO: compiled from: ParameterHandler.java */
    public static final class b<T> implements o<T> {
        public Class<?> a;

        public b(Class<?> cls) {
            this.a = cls;
        }

        @Override // d.c.a.o
        public void a(q qVar, T t, int i2) {
            if (c.n.a.e(this.a)) {
                qVar.a(i2, new InTypeWrapper(t, this.a));
                return;
            }
            StringBuilder sbB = d.b.a.a.a.B("Parameter type '");
            sbB.append(this.a.getSimpleName());
            sbB.append("' can be an out type, so you must declare it as @In, @Out or @Inout.");
            throw new IllegalArgumentException(sbB.toString());
        }
    }

    /* JADX INFO: compiled from: ParameterHandler.java */
    public static final class c<T> implements o<T> {
        public Annotation a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public Class<?> f2433b;

        public c(Annotation annotation, Class<?> cls) {
            this.a = annotation;
            this.f2433b = cls;
        }

        @Override // d.c.a.o
        public void a(q qVar, T t, int i2) {
            StringBuilder sbB = d.b.a.a.a.B(" mParamType:");
            sbB.append(this.f2433b);
            sbB.append(" value:");
            sbB.append(t);
            sbB.append(" index:");
            sbB.append(i2);
            l.a("ParamDirectionHandler", sbB.toString());
            if (c.n.a.e(this.f2433b) && !(this.a instanceof d.c.a.v.b)) {
                throw new IllegalArgumentException("Primitives are in by default, and cannot be otherwise.");
            }
            BaseTypeWrapper inOutTypeWrapper = null;
            Annotation annotation = this.a;
            if (annotation instanceof d.c.a.v.b) {
                inOutTypeWrapper = new InTypeWrapper(t, this.f2433b);
            } else if (annotation instanceof d.c.a.v.e) {
                inOutTypeWrapper = new OutTypeWrapper(t, this.f2433b);
            } else if (annotation instanceof d.c.a.v.c) {
                inOutTypeWrapper = new InOutTypeWrapper(t, this.f2433b);
            }
            qVar.a(i2, inOutTypeWrapper);
        }
    }

    void a(q qVar, T t, int i2);
}
