package a.i.b.a;

import a.a.v;
import a.f.a.a;
import a.f.b.j;
import a.i.b;
import a.i.b.a.c.a.b.c;
import a.i.b.a.c.a.h;
import a.i.b.a.c.b.ah;
import a.i.b.a.c.b.e;
import a.i.b.a.c.b.f;
import a.i.b.a.c.b.k;
import a.i.b.a.c.b.t;
import a.i.b.a.c.e.a.u;
import a.i.b.a.c.g.i;
import a.i.b.a.c.g.i$f;
import a.i.b.a.c.g.q;
import a.i.b.a.c.j.a.a.d;
import a.k.m;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.ytcommon.BuildConfig;
import java.util.Collection;
import java.util.List;

@l(dWo = {1, 1, 13}, dWp = {"\u0000¶\u0001\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0010\u001b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u001e\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0001\n\u0002\b\u0003\b\u0000\u0018\u0000*\b\b\u0000\u0010\u0001*\u00020\u00022\u00020\u00032\b\u0012\u0004\u0012\u0002H\u00010\u00042\u00020\u0005:\u0001`B\u0013\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007¢\u0006\u0002\u0010\bJ\u0013\u0010O\u001a\u00020%2\b\u0010P\u001a\u0004\u0018\u00010\u0002H\u0002J\u0016\u0010Q\u001a\b\u0012\u0004\u0012\u00020R0\u00132\u0006\u0010S\u001a\u00020TH\u0016J\u0012\u0010U\u001a\u0004\u0018\u00010V2\u0006\u0010W\u001a\u00020XH\u0016J\u0016\u0010Y\u001a\b\u0012\u0004\u0012\u00020V0\u00132\u0006\u0010S\u001a\u00020TH\u0016J\b\u0010Z\u001a\u00020XH\u0016J\u0012\u0010[\u001a\u00020%2\b\u0010\\\u001a\u0004\u0018\u00010\u0002H\u0016J\b\u0010]\u001a\u00020^H\u0002J\b\u0010_\u001a\u00020<H\u0016R\u001a\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000b0\n8VX\u0004¢\u0006\u0006\u001a\u0004\b\f\u0010\rR\u0014\u0010\u000e\u001a\u00020\u000f8BX\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u001a\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00140\u00138VX\u0004¢\u0006\u0006\u001a\u0004\b\u0015\u0010\u0016R \u0010\u0017\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00180\u00138VX\u0004¢\u0006\u0006\u001a\u0004\b\u0019\u0010\u0016R3\u0010\u001a\u001a$\u0012 \u0012\u001e \u001d*\u000e\u0018\u00010\u001cR\b\u0012\u0004\u0012\u00028\u00000\u00000\u001cR\b\u0012\u0004\u0012\u00028\u00000\u00000\u001b¢\u0006\b\n\u0000\u001a\u0004\b\u001e\u0010\u001fR\u0014\u0010 \u001a\u00020!8VX\u0004¢\u0006\u0006\u001a\u0004\b\"\u0010#R\u0014\u0010$\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b$\u0010&R\u0014\u0010'\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b'\u0010&R\u0014\u0010(\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b(\u0010&R\u0014\u0010)\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b)\u0010&R\u0014\u0010*\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b*\u0010&R\u0014\u0010+\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b+\u0010&R\u0014\u0010,\u001a\u00020%8VX\u0004¢\u0006\u0006\u001a\u0004\b,\u0010&R\u001a\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007X\u0004¢\u0006\b\n\u0000\u001a\u0004\b-\u0010.R\u0014\u0010/\u001a\u0002008@X\u0004¢\u0006\u0006\u001a\u0004\b1\u00102R\u001e\u00103\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u0003040\u00138VX\u0004¢\u0006\u0006\u001a\u0004\b5\u0010\u0016R\u001e\u00106\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u00040\u00138VX\u0004¢\u0006\u0006\u001a\u0004\b7\u0010\u0016R\u0016\u00108\u001a\u0004\u0018\u00018\u00008VX\u0004¢\u0006\u0006\u001a\u0004\b9\u0010:R\u0016\u0010;\u001a\u0004\u0018\u00010<8VX\u0004¢\u0006\u0006\u001a\u0004\b=\u0010>R\"\u0010?\u001a\u0010\u0012\f\u0012\n\u0012\u0006\b\u0001\u0012\u00028\u00000\u00040\n8VX\u0004¢\u0006\u0006\u001a\u0004\b@\u0010\rR\u0016\u0010A\u001a\u0004\u0018\u00010<8VX\u0004¢\u0006\u0006\u001a\u0004\bB\u0010>R\u0014\u0010C\u001a\u0002008@X\u0004¢\u0006\u0006\u001a\u0004\bD\u00102R\u001a\u0010E\u001a\b\u0012\u0004\u0012\u00020F0\n8VX\u0004¢\u0006\u0006\u001a\u0004\bG\u0010\rR\u001a\u0010H\u001a\b\u0012\u0004\u0012\u00020I0\n8VX\u0004¢\u0006\u0006\u001a\u0004\bJ\u0010\rR\u0016\u0010K\u001a\u0004\u0018\u00010L8VX\u0004¢\u0006\u0006\u001a\u0004\bM\u0010N¨\u0006a"}, dWq = {"Lkotlin/reflect/jvm/internal/KClassImpl;", "T", "", "Lkotlin/reflect/jvm/internal/KDeclarationContainerImpl;", "Lkotlin/reflect/KClass;", "Lkotlin/reflect/jvm/internal/KClassifierImpl;", "jClass", "Ljava/lang/Class;", "(Ljava/lang/Class;)V", "annotations", "", "", "getAnnotations", "()Ljava/util/List;", "classId", "Lkotlin/reflect/jvm/internal/impl/name/ClassId;", "getClassId", "()Lorg/jetbrains/kotlin/name/ClassId;", "constructorDescriptors", "", "Lkotlin/reflect/jvm/internal/impl/descriptors/ConstructorDescriptor;", "getConstructorDescriptors", "()Ljava/util/Collection;", "constructors", "Lkotlin/reflect/KFunction;", "getConstructors", "data", "Lkotlin/reflect/jvm/internal/ReflectProperties$LazyVal;", "Lkotlin/reflect/jvm/internal/KClassImpl$Data;", "kotlin.jvm.PlatformType", "getData", "()Lkotlin/reflect/jvm/internal/ReflectProperties$LazyVal;", "descriptor", "Lkotlin/reflect/jvm/internal/impl/descriptors/ClassDescriptor;", "getDescriptor", "()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;", "isAbstract", "", "()Z", "isCompanion", "isData", "isFinal", "isInner", "isOpen", "isSealed", "getJClass", "()Ljava/lang/Class;", "memberScope", "Lkotlin/reflect/jvm/internal/impl/resolve/scopes/MemberScope;", "getMemberScope$kotlin_reflect_api", "()Lorg/jetbrains/kotlin/resolve/scopes/MemberScope;", "members", "Lkotlin/reflect/KCallable;", "getMembers", "nestedClasses", "getNestedClasses", "objectInstance", "getObjectInstance", "()Ljava/lang/Object;", "qualifiedName", "", "getQualifiedName", "()Ljava/lang/String;", "sealedSubclasses", "getSealedSubclasses", "simpleName", "getSimpleName", "staticScope", "getStaticScope$kotlin_reflect_api", "supertypes", "Lkotlin/reflect/KType;", "getSupertypes", "typeParameters", "Lkotlin/reflect/KTypeParameter;", "getTypeParameters", "visibility", "Lkotlin/reflect/KVisibility;", "getVisibility", "()Lkotlin/reflect/KVisibility;", "equals", "other", "getFunctions", "Lkotlin/reflect/jvm/internal/impl/descriptors/FunctionDescriptor;", "name", "Lkotlin/reflect/jvm/internal/impl/name/Name;", "getLocalProperty", "Lkotlin/reflect/jvm/internal/impl/descriptors/PropertyDescriptor;", "index", "", "getProperties", "hashCode", "isInstance", "value", "reportUnresolvedClass", "", "toString", "Data", "kotlin-reflect-api"})
public final class g<T> extends i implements b<T> {
    final Class<T> AVA;
    final z.b<a> AWF;

    public g(Class<T> cls) {
        j.p(cls, "jClass");
        AppMethodBeat.i(118739);
        this.AVA = cls;
        z.b h = z.h((a) new b(this));
        j.o(h, "ReflectProperties.lazy { Data() }");
        this.AWF = h;
        AppMethodBeat.o(118739);
    }

    public final Class<T> dWH() {
        return this.AVA;
    }

    private e dWX() {
        AppMethodBeat.i(118727);
        e dWX = ((a) this.AWF.invoke()).dWX();
        AppMethodBeat.o(118727);
        return dWX;
    }

    private final a.i.b.a.c.f.a dWY() {
        AppMethodBeat.i(118728);
        ad adVar = ad.AYC;
        Class cls = this.AVA;
        j.p(cls, "klass");
        h aR;
        a.i.b.a.c.f.a aVar;
        if (cls.isArray()) {
            cls = cls.getComponentType();
            j.o(cls, "klass.componentType");
            aR = ad.aR(cls);
            if (aR != null) {
                aVar = new a.i.b.a.c.f.a(a.i.b.a.c.a.g.AZV, aR.Bca);
                AppMethodBeat.o(118728);
                return aVar;
            }
            aVar = a.i.b.a.c.f.a.n(a.i.b.a.c.a.g.Bag.Bat.ehI());
            j.o(aVar, "ClassId.topLevel(KotlinB….FQ_NAMES.array.toSafe())");
            AppMethodBeat.o(118728);
            return aVar;
        } else if (j.j(cls, Void.TYPE)) {
            aVar = ad.AYB;
            AppMethodBeat.o(118728);
            return aVar;
        } else {
            aR = ad.aR(cls);
            if (aR != null) {
                aVar = new a.i.b.a.c.f.a(a.i.b.a.c.a.g.AZV, aR.BbZ);
                AppMethodBeat.o(118728);
                return aVar;
            }
            a.i.b.a.c.f.a bb = a.i.b.a.e.b.bb(cls);
            if (!bb.ByO) {
                c cVar = c.Bdq;
                a.i.b.a.c.f.b ehE = bb.ehE();
                j.o(ehE, "classId.asSingleFqName()");
                aVar = c.f(ehE);
                if (aVar != null) {
                    AppMethodBeat.o(118728);
                    return aVar;
                }
            }
            AppMethodBeat.o(118728);
            return bb;
        }
    }

    public final a.i.b.a.c.i.e.h dWZ() {
        AppMethodBeat.i(118729);
        a.i.b.a.c.i.e.h dXR = dWX().dZf().dXR();
        AppMethodBeat.o(118729);
        return dXR;
    }

    public final a.i.b.a.c.i.e.h dXa() {
        AppMethodBeat.i(118730);
        a.i.b.a.c.i.e.h dXX = dWX().dXX();
        j.o(dXX, "descriptor.staticScope");
        AppMethodBeat.o(118730);
        return dXX;
    }

    public final Collection<k> dWR() {
        AppMethodBeat.i(118731);
        e dWX = dWX();
        if (dWX.dYc() == f.Bes || dWX.dYc() == f.Bew) {
            Collection collection = (List) v.AUP;
            AppMethodBeat.o(118731);
            return collection;
        }
        Collection<k> dYb = dWX.dYb();
        j.o(dYb, "descriptor.constructors");
        AppMethodBeat.o(118731);
        return dYb;
    }

    public final Collection<ah> a(a.i.b.a.c.f.f fVar) {
        AppMethodBeat.i(118732);
        j.p(fVar, "name");
        Collection b = a.a.j.b(dWZ().a(fVar, (a.i.b.a.c.c.a.a) a.i.b.a.c.c.a.c.BjM), dXa().a(fVar, (a.i.b.a.c.c.a.a) a.i.b.a.c.c.a.c.BjM));
        AppMethodBeat.o(118732);
        return b;
    }

    public final Collection<t> b(a.i.b.a.c.f.f fVar) {
        AppMethodBeat.i(118733);
        j.p(fVar, "name");
        Collection b = a.a.j.b(dWZ().b(fVar, (a.i.b.a.c.c.a.a) a.i.b.a.c.c.a.c.BjM), dXa().b(fVar, (a.i.b.a.c.c.a.a) a.i.b.a.c.c.a.c.BjM));
        AppMethodBeat.o(118733);
        return b;
    }

    public final String dWI() {
        AppMethodBeat.i(118735);
        String str = (String) ((a) this.AWF.invoke()).AWJ.invoke();
        AppMethodBeat.o(118735);
        return str;
    }

    public final boolean equals(Object obj) {
        AppMethodBeat.i(118736);
        if ((obj instanceof g) && j.j(a.f.a.c(this), a.f.a.c((b) obj))) {
            AppMethodBeat.o(118736);
            return true;
        }
        AppMethodBeat.o(118736);
        return false;
    }

    public final int hashCode() {
        AppMethodBeat.i(118737);
        int hashCode = a.f.a.c(this).hashCode();
        AppMethodBeat.o(118737);
        return hashCode;
    }

    public final String toString() {
        String str;
        AppMethodBeat.i(118738);
        StringBuilder stringBuilder = new StringBuilder("class ");
        a.i.b.a.c.f.a dWY = dWY();
        a.i.b.a.c.f.b bVar = dWY.BcW;
        j.o(bVar, "classId.packageFqName");
        if (bVar.ByQ.ByV.isEmpty()) {
            str = BuildConfig.FLAVOR;
        } else {
            str = bVar.ByQ.ByV + ".";
        }
        String str2 = dWY.ByN.ByQ.ByV;
        j.o(str2, "classId.relativeClassName.asString()");
        str = stringBuilder.append(str + m.a(str2, '.', '$')).toString();
        AppMethodBeat.o(118738);
        return str;
    }

    public final ah SJ(int i) {
        AppMethodBeat.i(118734);
        while (j.j(this.AVA.getSimpleName(), "DefaultImpls")) {
            Class declaringClass = this.AVA.getDeclaringClass();
            if (declaringClass == null || !declaringClass.isInterface()) {
                break;
            }
            b aM = a.f.a.aM(declaringClass);
            if (aM == null) {
                a.v vVar = new a.v("null cannot be cast to non-null type kotlin.reflect.jvm.internal.KClassImpl<*>");
                AppMethodBeat.o(118734);
                throw vVar;
            }
            this = (g) aM;
        }
        e dWX = this.dWX();
        if (!(dWX instanceof d)) {
            dWX = null;
        }
        d dVar = (d) dWX;
        if (dVar != null) {
            i.c cVar = (i.c) dVar.BGD;
            i$f i_f = a.i.b.a.c.e.b.b.BxI;
            j.o(i_f, "JvmProtoBuf.classLocalVariable");
            u uVar = (u) a.i.b.a.c.e.a.f.a(cVar, i_f, i);
            if (uVar != null) {
                ah ahVar = (ah) af.a(this.AVA, (q) uVar, dVar.BHj.AWq, dVar.BHj.AWr, dVar.BGE, (a.f.a.m) c.AXd);
                AppMethodBeat.o(118734);
                return ahVar;
            }
            AppMethodBeat.o(118734);
            return null;
        }
        AppMethodBeat.o(118734);
        return null;
    }
}
