package kotlin.reflect.jvm.internal.impl.load.java.components;

import androidx.media3.exoplayer.rtsp.SessionDescription;
import defpackage.cr4;
import defpackage.hk7;
import defpackage.iw7;
import defpackage.jk2;
import defpackage.kp6;
import defpackage.pq6;
import defpackage.qq3;
import defpackage.vx8;
import defpackage.y41;
import java.util.Collection;
import java.util.Map;
import kotlin.reflect.KProperty;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.PossiblyExternalAnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationArgument;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;

/* JADX INFO: loaded from: classes3.dex */
@vx8
public class JavaAnnotationDescriptor implements PossiblyExternalAnnotationDescriptor {
    static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {iw7.a.property1(new hk7(JavaAnnotationDescriptor.class, SessionDescription.ATTR_TYPE, "getType()Lorg/jetbrains/kotlin/types/SimpleType;", 0))};

    @pq6
    private final JavaAnnotationArgument firstArgument;

    @kp6
    private final FqName fqName;
    private final boolean isIdeExternalAnnotation;

    @kp6
    private final SourceElement source;

    @kp6
    private final NotNullLazyValue type$delegate;

    public JavaAnnotationDescriptor(@kp6 final LazyJavaResolverContext lazyJavaResolverContext, @pq6 JavaAnnotation javaAnnotation, @kp6 FqName fqName) {
        SourceElement sourceElementSource;
        Collection<JavaAnnotationArgument> arguments;
        cr4.g(lazyJavaResolverContext, "c");
        cr4.g(fqName, "fqName");
        this.fqName = fqName;
        if (javaAnnotation == null || (sourceElementSource = lazyJavaResolverContext.getComponents().getSourceElementFactory().source(javaAnnotation)) == null) {
            sourceElementSource = SourceElement.NO_SOURCE;
            cr4.f(sourceElementSource, "NO_SOURCE");
        }
        this.source = sourceElementSource;
        this.type$delegate = lazyJavaResolverContext.getStorageManager().createLazyValue(new qq3(lazyJavaResolverContext, this) { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationDescriptor$$Lambda$0
            private final LazyJavaResolverContext arg$0;
            private final JavaAnnotationDescriptor arg$1;

            {
                this.arg$0 = lazyJavaResolverContext;
                this.arg$1 = this;
            }

            @Override // defpackage.qq3
            public Object invoke() {
                return JavaAnnotationDescriptor.type_delegate$lambda$1(this.arg$0, this.arg$1);
            }
        });
        this.firstArgument = (javaAnnotation == null || (arguments = javaAnnotation.getArguments()) == null) ? null : (JavaAnnotationArgument) y41.aa(arguments);
        boolean z = false;
        if (javaAnnotation != null && javaAnnotation.isIdeExternalAnnotation()) {
            z = true;
        }
        this.isIdeExternalAnnotation = z;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final SimpleType type_delegate$lambda$1(LazyJavaResolverContext lazyJavaResolverContext, JavaAnnotationDescriptor javaAnnotationDescriptor) {
        SimpleType defaultType = lazyJavaResolverContext.getModule().getBuiltIns().getBuiltInClassByFqName(javaAnnotationDescriptor.getFqName()).getDefaultType();
        cr4.f(defaultType, "getDefaultType(...)");
        return defaultType;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
    @kp6
    public Map<Name, ConstantValue<?>> getAllValueArguments() {
        return jk2.a;
    }

    @pq6
    public final JavaAnnotationArgument getFirstArgument() {
        return this.firstArgument;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
    @kp6
    public FqName getFqName() {
        return this.fqName;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
    @kp6
    public SourceElement getSource() {
        return this.source;
    }

    @Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.PossiblyExternalAnnotationDescriptor
    public boolean isIdeExternalAnnotation() {
        return this.isIdeExternalAnnotation;
    }

    @Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
    @kp6
    public SimpleType getType() {
        return (SimpleType) StorageKt.getValue(this.type$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
    }
}
