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

import defpackage.cr4;
import defpackage.f25;
import defpackage.hk2;
import defpackage.kp6;
import defpackage.pq6;
import defpackage.vx8;
import java.util.Iterator;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.name.FqName;

/* JADX INFO: loaded from: classes3.dex */
public interface Annotations extends Iterable<AnnotationDescriptor>, f25 {

    @kp6
    public static final Companion Companion = Companion.$$INSTANCE;

    public static final class Companion {
        static final /* synthetic */ Companion $$INSTANCE = new Companion();

        @kp6
        private static final Annotations EMPTY = new Annotations() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations$Companion$EMPTY$1
            public Void findAnnotation(FqName fqName) {
                cr4.g(fqName, "fqName");
                return null;
            }

            @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
            public boolean hasAnnotation(FqName fqName) {
                return Annotations.DefaultImpls.hasAnnotation(this, fqName);
            }

            @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
            public boolean isEmpty() {
                return true;
            }

            @Override // java.lang.Iterable
            public Iterator<AnnotationDescriptor> iterator() {
                return hk2.a;
            }

            public String toString() {
                return "EMPTY";
            }

            @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
            /* JADX INFO: renamed from: findAnnotation, reason: collision with other method in class */
            public /* bridge */ /* synthetic */ AnnotationDescriptor mo165findAnnotation(FqName fqName) {
                return (AnnotationDescriptor) findAnnotation(fqName);
            }
        };

        private Companion() {
        }

        @kp6
        public final Annotations create(@kp6 List<? extends AnnotationDescriptor> list) {
            cr4.g(list, "annotations");
            return list.isEmpty() ? EMPTY : new AnnotationsImpl(list);
        }

        @kp6
        public final Annotations getEMPTY() {
            return EMPTY;
        }
    }

    @vx8
    public static final class DefaultImpls {
        @pq6
        public static AnnotationDescriptor findAnnotation(@kp6 Annotations annotations, @kp6 FqName fqName) {
            AnnotationDescriptor next;
            cr4.g(fqName, "fqName");
            Iterator<AnnotationDescriptor> it = annotations.iterator();
            while (true) {
                if (!it.hasNext()) {
                    next = null;
                    break;
                }
                next = it.next();
                if (cr4.b(next.getFqName(), fqName)) {
                    break;
                }
            }
            return next;
        }

        public static boolean hasAnnotation(@kp6 Annotations annotations, @kp6 FqName fqName) {
            cr4.g(fqName, "fqName");
            return annotations.mo165findAnnotation(fqName) != null;
        }
    }

    @pq6
    /* JADX INFO: renamed from: findAnnotation */
    AnnotationDescriptor mo165findAnnotation(@kp6 FqName fqName);

    boolean hasAnnotation(@kp6 FqName fqName);

    boolean isEmpty();
}
