package kotlin.reflect.jvm.internal.impl.descriptors.annotations;

import defpackage.cr4;
import defpackage.kp6;
import defpackage.og8;
import defpackage.pq6;
import defpackage.r23;
import defpackage.sg8;
import defpackage.sq3;
import defpackage.st;
import defpackage.vx8;
import defpackage.y41;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.name.FqName;

/* JADX INFO: loaded from: classes3.dex */
@vx8
public final class CompositeAnnotations implements Annotations {

    @kp6
    private final List<Annotations> delegates;

    /* JADX WARN: Multi-variable type inference failed */
    public CompositeAnnotations(@kp6 List<? extends Annotations> list) {
        cr4.g(list, "delegates");
        this.delegates = list;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final AnnotationDescriptor findAnnotation$lambda$2(FqName fqName, Annotations annotations) {
        cr4.g(annotations, "it");
        return annotations.mo165findAnnotation(fqName);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final og8 iterator$lambda$4(Annotations annotations) {
        cr4.g(annotations, "it");
        return y41.m(annotations);
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
    @pq6
    /* JADX INFO: renamed from: findAnnotation */
    public AnnotationDescriptor mo165findAnnotation(@kp6 final FqName fqName) {
        cr4.g(fqName, "fqName");
        return (AnnotationDescriptor) sg8.h(sg8.o(y41.m(this.delegates), new sq3(fqName) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.annotations.CompositeAnnotations$$Lambda$0
            private final FqName arg$0;

            {
                this.arg$0 = fqName;
            }

            @Override // defpackage.sq3
            public Object invoke(Object obj) {
                return CompositeAnnotations.findAnnotation$lambda$2(this.arg$0, (Annotations) obj);
            }
        }));
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
    public boolean hasAnnotation(@kp6 FqName fqName) {
        cr4.g(fqName, "fqName");
        Iterator it = y41.m(this.delegates).a.iterator();
        while (it.hasNext()) {
            if (((Annotations) it.next()).hasAnnotation(fqName)) {
                return true;
            }
        }
        return false;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
    public boolean isEmpty() {
        List<Annotations> list = this.delegates;
        if ((list instanceof Collection) && list.isEmpty()) {
            return true;
        }
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            if (!((Annotations) it.next()).isEmpty()) {
                return false;
            }
        }
        return true;
    }

    @Override // java.lang.Iterable
    @kp6
    public Iterator<AnnotationDescriptor> iterator() {
        return new r23(sg8.i(y41.m(this.delegates), new sq3() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.annotations.CompositeAnnotations$$Lambda$1
            @Override // defpackage.sq3
            public Object invoke(Object obj) {
                return CompositeAnnotations.iterator$lambda$4((Annotations) obj);
            }
        }));
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public CompositeAnnotations(@kp6 Annotations... annotationsArr) {
        this((List<? extends Annotations>) st.al(annotationsArr));
        cr4.g(annotationsArr, "delegates");
    }
}
