package k.a;

import j.h0;
import j.k0.o;
import j.m;
import j.p0.d.g0;
import j.p0.d.r;
import j.p0.d.s;
import java.lang.annotation.Annotation;
import java.util.List;
import k.a.n.d;
import k.a.n.j;

/* JADX INFO: compiled from: PolymorphicSerializer.kt */
/* JADX INFO: loaded from: classes.dex */
public final class e<T> extends k.a.p.b<T> {
    private final j.s0.c<T> a;
    private List<? extends Annotation> b;
    private final j.i c;

    /* JADX INFO: compiled from: PolymorphicSerializer.kt */
    static final class a extends s implements j.p0.c.a<k.a.n.f> {
        final /* synthetic */ e<T> b;

        /* JADX INFO: renamed from: k.a.e$a$a, reason: collision with other inner class name */
        /* JADX INFO: compiled from: PolymorphicSerializer.kt */
        static final class C0087a extends s implements j.p0.c.l<k.a.n.a, h0> {
            final /* synthetic */ e<T> b;

            /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
            C0087a(e<T> eVar) {
                super(1);
                this.b = eVar;
            }

            public final void a(k.a.n.a aVar) {
                r.f(aVar, "$this$buildSerialDescriptor");
                k.a.n.a.b(aVar, "type", k.a.m.a.H(g0.a).a(), null, false, 12, null);
                k.a.n.a.b(aVar, "value", k.a.n.i.d("kotlinx.serialization.Polymorphic<" + this.b.j().a() + '>', j.a.a, new k.a.n.f[0], null, 8, null), null, false, 12, null);
                aVar.h(((e) this.b).b);
            }

            @Override // j.p0.c.l
            public /* bridge */ /* synthetic */ h0 invoke(k.a.n.a aVar) {
                a(aVar);
                return h0.a;
            }
        }

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        a(e<T> eVar) {
            super(0);
            this.b = eVar;
        }

        @Override // j.p0.c.a
        /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
        public final k.a.n.f invoke() {
            return k.a.n.b.c(k.a.n.i.c("kotlinx.serialization.Polymorphic", d.a.a, new k.a.n.f[0], new C0087a(this.b)), this.b.j());
        }
    }

    public e(j.s0.c<T> cVar) {
        r.f(cVar, "baseClass");
        this.a = cVar;
        this.b = o.g();
        this.c = j.k.a(m.PUBLICATION, new a(this));
    }

    @Override // k.a.b, k.a.i, k.a.a
    public k.a.n.f a() {
        return (k.a.n.f) this.c.getValue();
    }

    @Override // k.a.p.b
    public j.s0.c<T> j() {
        return this.a;
    }

    public String toString() {
        return "kotlinx.serialization.PolymorphicSerializer(baseClass: " + j() + ')';
    }
}
