package yn;

import java.lang.reflect.GenericArrayType;
import java.lang.reflect.Type;
import java.lang.reflect.WildcardType;
import java.util.Iterator;

/* loaded from: classes3.dex */
public abstract class z implements io.x {

    /* renamed from: a, reason: collision with root package name */
    public static final a f52905a = new a(null);

    /* loaded from: classes3.dex */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }

        public final z a(Type type) {
            kotlin.jvm.internal.t.g(type, "type");
            boolean z10 = type instanceof Class;
            if (z10) {
                Class cls = (Class) type;
                if (cls.isPrimitive()) {
                    return new x(cls);
                }
            }
            return ((type instanceof GenericArrayType) || (z10 && ((Class) type).isArray())) ? new k(type) : type instanceof WildcardType ? new c0((WildcardType) type) : new n(type);
        }
    }

    protected abstract Type R();

    public boolean equals(Object obj) {
        return (obj instanceof z) && kotlin.jvm.internal.t.b(R(), ((z) obj).R());
    }

    public int hashCode() {
        return R().hashCode();
    }

    @Override // io.d
    public io.a j(ro.c fqName) {
        Object obj;
        kotlin.jvm.internal.t.g(fqName, "fqName");
        Iterator it = getAnnotations().iterator();
        while (true) {
            if (!it.hasNext()) {
                break;
            }
            Object next = it.next();
            ro.b e10 = ((io.a) next).e();
            if (kotlin.jvm.internal.t.b(e10 != null ? e10.b() : null, fqName)) {
                obj = next;
                break;
            }
        }
        return (io.a) obj;
    }

    public String toString() {
        return getClass().getName() + ": " + R();
    }
}
