Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
@@ -0,0 +1,390 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.MutabilityQualifier;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifierWithMigrationStatus;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nAbstractAnnotationTypeQualifierResolver.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AbstractAnnotationTypeQualifierResolver.kt\norg/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 MapsJVM.kt\nkotlin/collections/MapsKt__MapsJVMKt\n+ 5 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,213:1\n1#2:214\n1#2:220\n1#2:225\n1#2:247\n1747#3,3:215\n288#3,2:221\n1611#3:223\n1855#3:224\n1856#3:226\n1612#3:227\n1747#3,3:228\n1789#3,3:231\n1789#3,3:234\n1603#3,9:237\n1855#3:246\n1856#3:248\n1612#3:249\n72#4,2:218\n372#5,7:250\n*S KotlinDebug\n*F\n+ 1 AbstractAnnotationTypeQualifierResolver.kt\norg/jetbrains/kotlin/load/java/AbstractAnnotationTypeQualifierResolver\n*L\n40#1:220\n81#1:225\n162#1:247\n30#1:215,3\n79#1:221,2\n81#1:223\n81#1:224\n81#1:226\n81#1:227\n88#1:228,3\n124#1:231,3\n136#1:234,3\n162#1:237,9\n162#1:246\n162#1:248\n162#1:249\n40#1:218,2\n208#1:250,7\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class AbstractAnnotationTypeQualifierResolver<TAnnotation> {
|
||||
private static final Companion Companion = new Companion(null);
|
||||
private static final Map<String, AnnotationQualifierApplicabilityType> JAVA_APPLICABILITY_TYPES;
|
||||
private final JavaTypeEnhancementState javaTypeEnhancementState;
|
||||
private final ConcurrentHashMap<Object, TAnnotation> resolvedNicknames;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
for (AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType : AnnotationQualifierApplicabilityType.values()) {
|
||||
String javaTarget = annotationQualifierApplicabilityType.getJavaTarget();
|
||||
if (linkedHashMap.get(javaTarget) == null) {
|
||||
linkedHashMap.put(javaTarget, annotationQualifierApplicabilityType);
|
||||
}
|
||||
}
|
||||
JAVA_APPLICABILITY_TYPES = linkedHashMap;
|
||||
}
|
||||
|
||||
public AbstractAnnotationTypeQualifierResolver(JavaTypeEnhancementState javaTypeEnhancementState) {
|
||||
Intrinsics.checkNotNullParameter(javaTypeEnhancementState, "javaTypeEnhancementState");
|
||||
this.javaTypeEnhancementState = javaTypeEnhancementState;
|
||||
this.resolvedNicknames = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final Set<AnnotationQualifierApplicabilityType> allIfTypeUse(Set<? extends AnnotationQualifierApplicabilityType> set) {
|
||||
return set.contains(AnnotationQualifierApplicabilityType.TYPE_USE) ? SetsKt.plus(SetsKt.minus((Set<? extends AnnotationQualifierApplicabilityType>) ArraysKt.toSet(AnnotationQualifierApplicabilityType.values()), AnnotationQualifierApplicabilityType.TYPE_PARAMETER_BOUNDS), (Iterable) set) : set;
|
||||
}
|
||||
|
||||
private final JavaDefaultQualifiers extractDefaultQualifiers(TAnnotation tannotation) {
|
||||
NullabilityQualifierWithMigrationStatus extractNullability;
|
||||
JavaDefaultQualifiers resolveQualifierBuiltInDefaultAnnotation = resolveQualifierBuiltInDefaultAnnotation(tannotation);
|
||||
if (resolveQualifierBuiltInDefaultAnnotation != null) {
|
||||
return resolveQualifierBuiltInDefaultAnnotation;
|
||||
}
|
||||
Pair<TAnnotation, Set<AnnotationQualifierApplicabilityType>> resolveTypeQualifierDefaultAnnotation = resolveTypeQualifierDefaultAnnotation(tannotation);
|
||||
if (resolveTypeQualifierDefaultAnnotation == null) {
|
||||
return null;
|
||||
}
|
||||
TAnnotation component1 = resolveTypeQualifierDefaultAnnotation.component1();
|
||||
Set<AnnotationQualifierApplicabilityType> component2 = resolveTypeQualifierDefaultAnnotation.component2();
|
||||
ReportLevel resolveJsr305CustomState = resolveJsr305CustomState(tannotation);
|
||||
if (resolveJsr305CustomState == null) {
|
||||
resolveJsr305CustomState = resolveJsr305AnnotationState(component1);
|
||||
}
|
||||
if (resolveJsr305CustomState.isIgnore() || (extractNullability = extractNullability((AbstractAnnotationTypeQualifierResolver<TAnnotation>) component1, (Function1<? super AbstractAnnotationTypeQualifierResolver<TAnnotation>, Boolean>) new Function1<TAnnotation, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver$extractDefaultQualifiers$nullabilityQualifier$1
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(TAnnotation extractNullability2) {
|
||||
Intrinsics.checkNotNullParameter(extractNullability2, "$this$extractNullability");
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Boolean invoke(Object obj) {
|
||||
return invoke((AbstractAnnotationTypeQualifierResolver$extractDefaultQualifiers$nullabilityQualifier$1<TAnnotation>) obj);
|
||||
}
|
||||
})) == null) {
|
||||
return null;
|
||||
}
|
||||
return new JavaDefaultQualifiers(NullabilityQualifierWithMigrationStatus.copy$default(extractNullability, null, resolveJsr305CustomState.isWarning(), 1, null), component2, false, 4, null);
|
||||
}
|
||||
|
||||
private final TAnnotation findAnnotation(TAnnotation tannotation, FqName fqName) {
|
||||
for (TAnnotation tannotation2 : getMetaAnnotations(tannotation)) {
|
||||
if (Intrinsics.areEqual(getFqName(tannotation2), fqName)) {
|
||||
return tannotation2;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private final boolean hasAnnotation(TAnnotation tannotation, FqName fqName) {
|
||||
Iterable<TAnnotation> metaAnnotations = getMetaAnnotations(tannotation);
|
||||
if ((metaAnnotations instanceof Collection) && ((Collection) metaAnnotations).isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
Iterator<TAnnotation> it = metaAnnotations.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (Intrinsics.areEqual(getFqName(it.next()), fqName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
|
||||
/* JADX WARN: Code restructure failed: missing block: B:37:0x0091, code lost:
|
||||
|
||||
if (r6.equals("ALWAYS") != false) goto L47;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:42:0x00a6, code lost:
|
||||
|
||||
if (r6.equals("NEVER") == false) goto L45;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:43:0x00b2, code lost:
|
||||
|
||||
r6 = kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifier.NULLABLE;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:45:0x00af, code lost:
|
||||
|
||||
if (r6.equals("MAYBE") == false) goto L45;
|
||||
*/
|
||||
/* JADX WARN: Failed to find 'out' block for switch in B:35:0x0087. Please report as an issue. */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private final kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifierWithMigrationStatus knownNullability(TAnnotation r7, boolean r8) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 270
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver.knownNullability(java.lang.Object, boolean):kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifierWithMigrationStatus");
|
||||
}
|
||||
|
||||
private final ReportLevel resolveDefaultAnnotationState(TAnnotation tannotation) {
|
||||
FqName fqName = getFqName(tannotation);
|
||||
return (fqName == null || !AnnotationQualifiersFqNamesKt.getJSPECIFY_DEFAULT_ANNOTATIONS().containsKey(fqName)) ? resolveJsr305AnnotationState(tannotation) : this.javaTypeEnhancementState.getGetReportLevelForAnnotation().invoke(fqName);
|
||||
}
|
||||
|
||||
private final ReportLevel resolveJsr305AnnotationState(TAnnotation tannotation) {
|
||||
ReportLevel resolveJsr305CustomState = resolveJsr305CustomState(tannotation);
|
||||
return resolveJsr305CustomState != null ? resolveJsr305CustomState : this.javaTypeEnhancementState.getJsr305().getGlobalLevel();
|
||||
}
|
||||
|
||||
private final ReportLevel resolveJsr305CustomState(TAnnotation tannotation) {
|
||||
Iterable<String> enumArguments;
|
||||
String str;
|
||||
ReportLevel reportLevel = this.javaTypeEnhancementState.getJsr305().getUserDefinedLevelForSpecificAnnotation().get(getFqName(tannotation));
|
||||
if (reportLevel != null) {
|
||||
return reportLevel;
|
||||
}
|
||||
TAnnotation findAnnotation = findAnnotation(tannotation, AnnotationQualifiersFqNamesKt.getMIGRATION_ANNOTATION_FQNAME());
|
||||
if (findAnnotation == null || (enumArguments = enumArguments(findAnnotation, false)) == null || (str = (String) CollectionsKt.firstOrNull(enumArguments)) == null) {
|
||||
return null;
|
||||
}
|
||||
ReportLevel migrationLevel = this.javaTypeEnhancementState.getJsr305().getMigrationLevel();
|
||||
if (migrationLevel != null) {
|
||||
return migrationLevel;
|
||||
}
|
||||
int hashCode = str.hashCode();
|
||||
if (hashCode != -2137067054) {
|
||||
if (hashCode != -1838656823) {
|
||||
if (hashCode == 2656902 && str.equals("WARN")) {
|
||||
return ReportLevel.WARN;
|
||||
}
|
||||
} else if (str.equals("STRICT")) {
|
||||
return ReportLevel.STRICT;
|
||||
}
|
||||
} else if (str.equals("IGNORE")) {
|
||||
return ReportLevel.IGNORE;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private final JavaDefaultQualifiers resolveQualifierBuiltInDefaultAnnotation(TAnnotation tannotation) {
|
||||
JavaDefaultQualifiers javaDefaultQualifiers;
|
||||
if (this.javaTypeEnhancementState.getDisabledDefaultAnnotations() || (javaDefaultQualifiers = AnnotationQualifiersFqNamesKt.getBUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS().get(getFqName(tannotation))) == null) {
|
||||
return null;
|
||||
}
|
||||
ReportLevel resolveDefaultAnnotationState = resolveDefaultAnnotationState(tannotation);
|
||||
if (resolveDefaultAnnotationState == ReportLevel.IGNORE) {
|
||||
resolveDefaultAnnotationState = null;
|
||||
}
|
||||
if (resolveDefaultAnnotationState == null) {
|
||||
return null;
|
||||
}
|
||||
return JavaDefaultQualifiers.copy$default(javaDefaultQualifiers, NullabilityQualifierWithMigrationStatus.copy$default(javaDefaultQualifiers.getNullabilityQualifier(), null, resolveDefaultAnnotationState.isWarning(), 1, null), null, false, 6, null);
|
||||
}
|
||||
|
||||
private final Pair<TAnnotation, Set<AnnotationQualifierApplicabilityType>> resolveTypeQualifierDefaultAnnotation(TAnnotation tannotation) {
|
||||
TAnnotation findAnnotation;
|
||||
TAnnotation tannotation2;
|
||||
if (this.javaTypeEnhancementState.getJsr305().isDisabled() || (findAnnotation = findAnnotation(tannotation, AnnotationQualifiersFqNamesKt.getTYPE_QUALIFIER_DEFAULT_FQNAME())) == null) {
|
||||
return null;
|
||||
}
|
||||
Iterator<TAnnotation> it = getMetaAnnotations(tannotation).iterator();
|
||||
while (true) {
|
||||
if (!it.hasNext()) {
|
||||
tannotation2 = null;
|
||||
break;
|
||||
}
|
||||
tannotation2 = it.next();
|
||||
if (resolveTypeQualifierAnnotation(tannotation2) != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tannotation2 == null) {
|
||||
return null;
|
||||
}
|
||||
Iterable<String> enumArguments = enumArguments(findAnnotation, true);
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
Iterator<String> it2 = enumArguments.iterator();
|
||||
while (it2.hasNext()) {
|
||||
AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType = JAVA_APPLICABILITY_TYPES.get(it2.next());
|
||||
if (annotationQualifierApplicabilityType != null) {
|
||||
linkedHashSet.add(annotationQualifierApplicabilityType);
|
||||
}
|
||||
}
|
||||
return new Pair<>(tannotation2, allIfTypeUse(linkedHashSet));
|
||||
}
|
||||
|
||||
public abstract Iterable<String> enumArguments(TAnnotation tannotation, boolean z3);
|
||||
|
||||
public final JavaTypeQualifiersByElementType extractAndMergeDefaultQualifiers(JavaTypeQualifiersByElementType javaTypeQualifiersByElementType, Iterable<? extends TAnnotation> annotations) {
|
||||
EnumMap<AnnotationQualifierApplicabilityType, JavaDefaultQualifiers> defaultQualifiers;
|
||||
Intrinsics.checkNotNullParameter(annotations, "annotations");
|
||||
if (!this.javaTypeEnhancementState.getDisabledDefaultAnnotations()) {
|
||||
ArrayList<JavaDefaultQualifiers> arrayList = new ArrayList();
|
||||
Iterator<? extends TAnnotation> it = annotations.iterator();
|
||||
while (it.hasNext()) {
|
||||
JavaDefaultQualifiers extractDefaultQualifiers = extractDefaultQualifiers(it.next());
|
||||
if (extractDefaultQualifiers != null) {
|
||||
arrayList.add(extractDefaultQualifiers);
|
||||
}
|
||||
}
|
||||
if (!arrayList.isEmpty()) {
|
||||
EnumMap enumMap = (javaTypeQualifiersByElementType == null || (defaultQualifiers = javaTypeQualifiersByElementType.getDefaultQualifiers()) == null) ? new EnumMap(AnnotationQualifierApplicabilityType.class) : new EnumMap((EnumMap) defaultQualifiers);
|
||||
boolean z3 = false;
|
||||
for (JavaDefaultQualifiers javaDefaultQualifiers : arrayList) {
|
||||
Iterator<AnnotationQualifierApplicabilityType> it2 = javaDefaultQualifiers.getQualifierApplicabilityTypes().iterator();
|
||||
while (it2.hasNext()) {
|
||||
enumMap.put((EnumMap) it2.next(), (AnnotationQualifierApplicabilityType) javaDefaultQualifiers);
|
||||
z3 = true;
|
||||
}
|
||||
}
|
||||
if (z3) {
|
||||
return new JavaTypeQualifiersByElementType(enumMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return javaTypeQualifiersByElementType;
|
||||
}
|
||||
|
||||
public final MutabilityQualifier extractMutability(Iterable<? extends TAnnotation> annotations) {
|
||||
MutabilityQualifier mutabilityQualifier;
|
||||
Intrinsics.checkNotNullParameter(annotations, "annotations");
|
||||
Iterator<? extends TAnnotation> it = annotations.iterator();
|
||||
MutabilityQualifier mutabilityQualifier2 = null;
|
||||
while (it.hasNext()) {
|
||||
FqName fqName = getFqName(it.next());
|
||||
if (JvmAnnotationNamesKt.getREAD_ONLY_ANNOTATIONS().contains(fqName)) {
|
||||
mutabilityQualifier = MutabilityQualifier.READ_ONLY;
|
||||
} else if (JvmAnnotationNamesKt.getMUTABLE_ANNOTATIONS().contains(fqName)) {
|
||||
mutabilityQualifier = MutabilityQualifier.MUTABLE;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
if (mutabilityQualifier2 != null && mutabilityQualifier2 != mutabilityQualifier) {
|
||||
return null;
|
||||
}
|
||||
mutabilityQualifier2 = mutabilityQualifier;
|
||||
}
|
||||
return mutabilityQualifier2;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final NullabilityQualifierWithMigrationStatus extractNullability(Iterable<? extends TAnnotation> iterable, Function1<? super TAnnotation, Boolean> function1) {
|
||||
Iterator t2 = a.t(iterable, "annotations", function1, "forceWarning");
|
||||
NullabilityQualifierWithMigrationStatus nullabilityQualifierWithMigrationStatus = null;
|
||||
while (t2.hasNext()) {
|
||||
NullabilityQualifierWithMigrationStatus extractNullability = extractNullability((AbstractAnnotationTypeQualifierResolver<TAnnotation>) t2.next(), (Function1<? super AbstractAnnotationTypeQualifierResolver<TAnnotation>, Boolean>) function1);
|
||||
if (nullabilityQualifierWithMigrationStatus != null) {
|
||||
if (extractNullability != null && !Intrinsics.areEqual(extractNullability, nullabilityQualifierWithMigrationStatus) && (!extractNullability.isForWarningOnly() || nullabilityQualifierWithMigrationStatus.isForWarningOnly())) {
|
||||
if (extractNullability.isForWarningOnly() || !nullabilityQualifierWithMigrationStatus.isForWarningOnly()) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
nullabilityQualifierWithMigrationStatus = extractNullability;
|
||||
}
|
||||
return nullabilityQualifierWithMigrationStatus;
|
||||
}
|
||||
|
||||
public abstract FqName getFqName(TAnnotation tannotation);
|
||||
|
||||
public abstract Object getKey(TAnnotation tannotation);
|
||||
|
||||
public abstract Iterable<TAnnotation> getMetaAnnotations(TAnnotation tannotation);
|
||||
|
||||
public final boolean isTypeUseAnnotation(TAnnotation annotation) {
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
TAnnotation findAnnotation = findAnnotation(annotation, StandardNames.FqNames.target);
|
||||
if (findAnnotation == null) {
|
||||
return false;
|
||||
}
|
||||
Iterable<String> enumArguments = enumArguments(findAnnotation, false);
|
||||
if ((enumArguments instanceof Collection) && ((Collection) enumArguments).isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
Iterator<String> it = enumArguments.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (Intrinsics.areEqual(it.next(), "TYPE")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final TAnnotation resolveTypeQualifierAnnotation(TAnnotation annotation) {
|
||||
TAnnotation tannotation;
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
if (this.javaTypeEnhancementState.getJsr305().isDisabled()) {
|
||||
return null;
|
||||
}
|
||||
if (CollectionsKt.contains(AnnotationQualifiersFqNamesKt.getBUILT_IN_TYPE_QUALIFIER_FQ_NAMES(), getFqName(annotation)) || hasAnnotation(annotation, AnnotationQualifiersFqNamesKt.getTYPE_QUALIFIER_FQNAME())) {
|
||||
return annotation;
|
||||
}
|
||||
if (!hasAnnotation(annotation, AnnotationQualifiersFqNamesKt.getTYPE_QUALIFIER_NICKNAME_FQNAME())) {
|
||||
return null;
|
||||
}
|
||||
ConcurrentHashMap<Object, TAnnotation> concurrentHashMap = this.resolvedNicknames;
|
||||
Object key = getKey(annotation);
|
||||
TAnnotation tannotation2 = concurrentHashMap.get(key);
|
||||
if (tannotation2 != null) {
|
||||
return tannotation2;
|
||||
}
|
||||
Iterator<TAnnotation> it = getMetaAnnotations(annotation).iterator();
|
||||
while (true) {
|
||||
if (!it.hasNext()) {
|
||||
tannotation = null;
|
||||
break;
|
||||
}
|
||||
tannotation = resolveTypeQualifierAnnotation(it.next());
|
||||
if (tannotation != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tannotation == null) {
|
||||
return null;
|
||||
}
|
||||
TAnnotation putIfAbsent = concurrentHashMap.putIfAbsent(key, tannotation);
|
||||
return putIfAbsent == null ? tannotation : putIfAbsent;
|
||||
}
|
||||
|
||||
private final NullabilityQualifierWithMigrationStatus extractNullability(TAnnotation tannotation, Function1<? super TAnnotation, Boolean> function1) {
|
||||
NullabilityQualifierWithMigrationStatus knownNullability;
|
||||
NullabilityQualifierWithMigrationStatus knownNullability2 = knownNullability(tannotation, function1.invoke(tannotation).booleanValue());
|
||||
if (knownNullability2 != null) {
|
||||
return knownNullability2;
|
||||
}
|
||||
TAnnotation resolveTypeQualifierAnnotation = resolveTypeQualifierAnnotation(tannotation);
|
||||
if (resolveTypeQualifierAnnotation == null) {
|
||||
return null;
|
||||
}
|
||||
ReportLevel resolveJsr305AnnotationState = resolveJsr305AnnotationState(tannotation);
|
||||
if (resolveJsr305AnnotationState.isIgnore() || (knownNullability = knownNullability(resolveTypeQualifierAnnotation, function1.invoke(resolveTypeQualifierAnnotation).booleanValue())) == null) {
|
||||
return null;
|
||||
}
|
||||
return NullabilityQualifierWithMigrationStatus.copy$default(knownNullability, null, resolveJsr305AnnotationState.isWarning(), 1, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AnnotationQualifierApplicabilityType {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ AnnotationQualifierApplicabilityType[] $VALUES;
|
||||
private final String javaTarget;
|
||||
public static final AnnotationQualifierApplicabilityType METHOD_RETURN_TYPE = new AnnotationQualifierApplicabilityType("METHOD_RETURN_TYPE", 0, "METHOD");
|
||||
public static final AnnotationQualifierApplicabilityType VALUE_PARAMETER = new AnnotationQualifierApplicabilityType("VALUE_PARAMETER", 1, "PARAMETER");
|
||||
public static final AnnotationQualifierApplicabilityType FIELD = new AnnotationQualifierApplicabilityType("FIELD", 2, "FIELD");
|
||||
public static final AnnotationQualifierApplicabilityType TYPE_USE = new AnnotationQualifierApplicabilityType("TYPE_USE", 3, "TYPE_USE");
|
||||
public static final AnnotationQualifierApplicabilityType TYPE_PARAMETER_BOUNDS = new AnnotationQualifierApplicabilityType("TYPE_PARAMETER_BOUNDS", 4, "TYPE_USE");
|
||||
public static final AnnotationQualifierApplicabilityType TYPE_PARAMETER = new AnnotationQualifierApplicabilityType("TYPE_PARAMETER", 5, "TYPE_PARAMETER");
|
||||
|
||||
private static final /* synthetic */ AnnotationQualifierApplicabilityType[] $values() {
|
||||
return new AnnotationQualifierApplicabilityType[]{METHOD_RETURN_TYPE, VALUE_PARAMETER, FIELD, TYPE_USE, TYPE_PARAMETER_BOUNDS, TYPE_PARAMETER};
|
||||
}
|
||||
|
||||
static {
|
||||
AnnotationQualifierApplicabilityType[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private AnnotationQualifierApplicabilityType(String str, int i, String str2) {
|
||||
this.javaTarget = str2;
|
||||
}
|
||||
|
||||
public static AnnotationQualifierApplicabilityType valueOf(String str) {
|
||||
return (AnnotationQualifierApplicabilityType) Enum.valueOf(AnnotationQualifierApplicabilityType.class, str);
|
||||
}
|
||||
|
||||
public static AnnotationQualifierApplicabilityType[] values() {
|
||||
return (AnnotationQualifierApplicabilityType[]) $VALUES.clone();
|
||||
}
|
||||
|
||||
public final String getJavaTarget() {
|
||||
return this.javaTarget;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifier;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifierWithMigrationStatus;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AnnotationQualifiersFqNamesKt {
|
||||
private static final Map<FqName, JavaDefaultQualifiers> BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS;
|
||||
private static final Set<FqName> BUILT_IN_TYPE_QUALIFIER_FQ_NAMES;
|
||||
private static final List<AnnotationQualifierApplicabilityType> DEFAULT_JSPECIFY_APPLICABILITY;
|
||||
private static final Map<FqName, JavaDefaultQualifiers> JSPECIFY_DEFAULT_ANNOTATIONS;
|
||||
private static final FqName TYPE_QUALIFIER_NICKNAME_FQNAME = new FqName("javax.annotation.meta.TypeQualifierNickname");
|
||||
private static final FqName TYPE_QUALIFIER_FQNAME = new FqName("javax.annotation.meta.TypeQualifier");
|
||||
private static final FqName TYPE_QUALIFIER_DEFAULT_FQNAME = new FqName("javax.annotation.meta.TypeQualifierDefault");
|
||||
private static final FqName MIGRATION_ANNOTATION_FQNAME = new FqName("kotlin.annotations.jvm.UnderMigration");
|
||||
|
||||
static {
|
||||
AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType = AnnotationQualifierApplicabilityType.FIELD;
|
||||
AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType2 = AnnotationQualifierApplicabilityType.METHOD_RETURN_TYPE;
|
||||
AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType3 = AnnotationQualifierApplicabilityType.VALUE_PARAMETER;
|
||||
List<AnnotationQualifierApplicabilityType> listOf = CollectionsKt.listOf((Object[]) new AnnotationQualifierApplicabilityType[]{annotationQualifierApplicabilityType, annotationQualifierApplicabilityType2, annotationQualifierApplicabilityType3, AnnotationQualifierApplicabilityType.TYPE_PARAMETER_BOUNDS, AnnotationQualifierApplicabilityType.TYPE_USE});
|
||||
DEFAULT_JSPECIFY_APPLICABILITY = listOf;
|
||||
FqName jspecify_old_null_marked = JvmAnnotationNamesKt.getJSPECIFY_OLD_NULL_MARKED();
|
||||
NullabilityQualifier nullabilityQualifier = NullabilityQualifier.NOT_NULL;
|
||||
List<AnnotationQualifierApplicabilityType> list = listOf;
|
||||
Map<FqName, JavaDefaultQualifiers> mapOf = MapsKt.mapOf(TuplesKt.to(jspecify_old_null_marked, new JavaDefaultQualifiers(new NullabilityQualifierWithMigrationStatus(nullabilityQualifier, false, 2, null), list, false)), TuplesKt.to(JvmAnnotationNamesKt.getJSPECIFY_NULL_MARKED(), new JavaDefaultQualifiers(new NullabilityQualifierWithMigrationStatus(nullabilityQualifier, false, 2, null), list, false)));
|
||||
JSPECIFY_DEFAULT_ANNOTATIONS = mapOf;
|
||||
BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS = MapsKt.plus(MapsKt.mapOf(TuplesKt.to(new FqName("javax.annotation.ParametersAreNullableByDefault"), new JavaDefaultQualifiers(new NullabilityQualifierWithMigrationStatus(NullabilityQualifier.NULLABLE, false, 2, null), CollectionsKt.listOf(annotationQualifierApplicabilityType3), false, 4, null)), TuplesKt.to(new FqName("javax.annotation.ParametersAreNonnullByDefault"), new JavaDefaultQualifiers(new NullabilityQualifierWithMigrationStatus(nullabilityQualifier, false, 2, null), CollectionsKt.listOf(annotationQualifierApplicabilityType3), false, 4, null))), mapOf);
|
||||
BUILT_IN_TYPE_QUALIFIER_FQ_NAMES = SetsKt.setOf((Object[]) new FqName[]{JvmAnnotationNamesKt.getJAVAX_NONNULL_ANNOTATION(), JvmAnnotationNamesKt.getJAVAX_CHECKFORNULL_ANNOTATION()});
|
||||
}
|
||||
|
||||
public static final Map<FqName, JavaDefaultQualifiers> getBUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS() {
|
||||
return BUILT_IN_TYPE_QUALIFIER_DEFAULT_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final Set<FqName> getBUILT_IN_TYPE_QUALIFIER_FQ_NAMES() {
|
||||
return BUILT_IN_TYPE_QUALIFIER_FQ_NAMES;
|
||||
}
|
||||
|
||||
public static final Map<FqName, JavaDefaultQualifiers> getJSPECIFY_DEFAULT_ANNOTATIONS() {
|
||||
return JSPECIFY_DEFAULT_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final FqName getMIGRATION_ANNOTATION_FQNAME() {
|
||||
return MIGRATION_ANNOTATION_FQNAME;
|
||||
}
|
||||
|
||||
public static final FqName getTYPE_QUALIFIER_DEFAULT_FQNAME() {
|
||||
return TYPE_QUALIFIER_DEFAULT_FQNAME;
|
||||
}
|
||||
|
||||
public static final FqName getTYPE_QUALIFIER_FQNAME() {
|
||||
return TYPE_QUALIFIER_FQNAME;
|
||||
}
|
||||
|
||||
public static final FqName getTYPE_QUALIFIER_NICKNAME_FQNAME() {
|
||||
return TYPE_QUALIFIER_NICKNAME_FQNAME;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ArrayValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.EnumValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nAnnotationTypeQualifierResolver.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AnnotationTypeQualifierResolver.kt\norg/jetbrains/kotlin/load/java/AnnotationTypeQualifierResolver\n+ 2 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,54:1\n76#2:55\n96#2,5:56\n1360#3:61\n1446#3,5:62\n*S KotlinDebug\n*F\n+ 1 AnnotationTypeQualifierResolver.kt\norg/jetbrains/kotlin/load/java/AnnotationTypeQualifierResolver\n*L\n40#1:55\n40#1:56,5\n49#1:61\n49#1:62,5\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AnnotationTypeQualifierResolver extends AbstractAnnotationTypeQualifierResolver<AnnotationDescriptor> {
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public AnnotationTypeQualifierResolver(JavaTypeEnhancementState javaTypeEnhancementState) {
|
||||
super(javaTypeEnhancementState);
|
||||
Intrinsics.checkNotNullParameter(javaTypeEnhancementState, "javaTypeEnhancementState");
|
||||
}
|
||||
|
||||
private final List<String> toEnumNames(ConstantValue<?> constantValue) {
|
||||
if (!(constantValue instanceof ArrayValue)) {
|
||||
return constantValue instanceof EnumValue ? CollectionsKt.listOf(((EnumValue) constantValue).getEnumEntryName().getIdentifier()) : CollectionsKt.emptyList();
|
||||
}
|
||||
List<? extends ConstantValue<?>> value = ((ArrayValue) constantValue).getValue();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<T> it = value.iterator();
|
||||
while (it.hasNext()) {
|
||||
CollectionsKt__MutableCollectionsKt.addAll(arrayList, toEnumNames((ConstantValue) it.next()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver
|
||||
public Iterable<String> enumArguments(AnnotationDescriptor annotationDescriptor, boolean z3) {
|
||||
List<String> enumNames;
|
||||
Intrinsics.checkNotNullParameter(annotationDescriptor, "<this>");
|
||||
Map<Name, ConstantValue<?>> allValueArguments = annotationDescriptor.getAllValueArguments();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Map.Entry<Name, ConstantValue<?>> entry : allValueArguments.entrySet()) {
|
||||
Name key = entry.getKey();
|
||||
ConstantValue<?> value = entry.getValue();
|
||||
if (z3 && !Intrinsics.areEqual(key, JvmAnnotationNames.DEFAULT_ANNOTATION_MEMBER_NAME)) {
|
||||
enumNames = CollectionsKt.emptyList();
|
||||
} else {
|
||||
enumNames = toEnumNames(value);
|
||||
}
|
||||
CollectionsKt__MutableCollectionsKt.addAll(arrayList, enumNames);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver
|
||||
public FqName getFqName(AnnotationDescriptor annotationDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(annotationDescriptor, "<this>");
|
||||
return annotationDescriptor.getFqName();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver
|
||||
public Object getKey(AnnotationDescriptor annotationDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(annotationDescriptor, "<this>");
|
||||
ClassDescriptor annotationClass = DescriptorUtilsKt.getAnnotationClass(annotationDescriptor);
|
||||
Intrinsics.checkNotNull(annotationClass);
|
||||
return annotationClass;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.AbstractAnnotationTypeQualifierResolver
|
||||
public Iterable<AnnotationDescriptor> getMetaAnnotations(AnnotationDescriptor annotationDescriptor) {
|
||||
Annotations annotations;
|
||||
Intrinsics.checkNotNullParameter(annotationDescriptor, "<this>");
|
||||
ClassDescriptor annotationClass = DescriptorUtilsKt.getAnnotationClass(annotationDescriptor);
|
||||
return (annotationClass == null || (annotations = annotationClass.getAnnotations()) == null) ? CollectionsKt.emptyList() : annotations;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureMappingKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuiltinMethodsWithDifferentJvmName extends SpecialGenericSignatures {
|
||||
public static final BuiltinMethodsWithDifferentJvmName INSTANCE = new BuiltinMethodsWithDifferentJvmName();
|
||||
|
||||
private BuiltinMethodsWithDifferentJvmName() {
|
||||
}
|
||||
|
||||
public final Name getJvmName(SimpleFunctionDescriptor functionDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(functionDescriptor, "functionDescriptor");
|
||||
Map<String, Name> signature_to_jvm_representation_name = SpecialGenericSignatures.Companion.getSIGNATURE_TO_JVM_REPRESENTATION_NAME();
|
||||
String computeJvmSignature = MethodSignatureMappingKt.computeJvmSignature(functionDescriptor);
|
||||
if (computeJvmSignature == null) {
|
||||
return null;
|
||||
}
|
||||
return signature_to_jvm_representation_name.get(computeJvmSignature);
|
||||
}
|
||||
|
||||
public final boolean isBuiltinFunctionWithDifferentNameInJvm(final SimpleFunctionDescriptor functionDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(functionDescriptor, "functionDescriptor");
|
||||
return KotlinBuiltIns.isBuiltIn(functionDescriptor) && DescriptorUtilsKt.firstOverridden$default(functionDescriptor, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.BuiltinMethodsWithDifferentJvmName$isBuiltinFunctionWithDifferentNameInJvm$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(SpecialGenericSignatures.Companion.getSIGNATURE_TO_JVM_REPRESENTATION_NAME().containsKey(MethodSignatureMappingKt.computeJvmSignature(SimpleFunctionDescriptor.this)));
|
||||
}
|
||||
}, 1, null) != null;
|
||||
}
|
||||
|
||||
public final boolean isRemoveAtByIndex(SimpleFunctionDescriptor simpleFunctionDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(simpleFunctionDescriptor, "<this>");
|
||||
return Intrinsics.areEqual(simpleFunctionDescriptor.getName().asString(), "removeAt") && Intrinsics.areEqual(MethodSignatureMappingKt.computeJvmSignature(simpleFunctionDescriptor), SpecialGenericSignatures.Companion.getREMOVE_AT_NAME_AND_SIGNATURE().getSignature());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.SpecialGenericSignatures;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureMappingKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nspecialBuiltinMembers.kt\nKotlin\n*S Kotlin\n*F\n+ 1 specialBuiltinMembers.kt\norg/jetbrains/kotlin/load/java/BuiltinMethodsWithSpecialGenericSignature\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,182:1\n1#2:183\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuiltinMethodsWithSpecialGenericSignature extends SpecialGenericSignatures {
|
||||
public static final BuiltinMethodsWithSpecialGenericSignature INSTANCE = new BuiltinMethodsWithSpecialGenericSignature();
|
||||
|
||||
private BuiltinMethodsWithSpecialGenericSignature() {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean getHasErasedValueParametersInJava(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
return CollectionsKt.contains(SpecialGenericSignatures.Companion.getERASED_VALUE_PARAMETERS_SIGNATURES(), MethodSignatureMappingKt.computeJvmSignature(callableMemberDescriptor));
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final FunctionDescriptor getOverriddenBuiltinFunctionWithErasedValueParametersInJava(FunctionDescriptor functionDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(functionDescriptor, "functionDescriptor");
|
||||
BuiltinMethodsWithSpecialGenericSignature builtinMethodsWithSpecialGenericSignature = INSTANCE;
|
||||
Name name = functionDescriptor.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
if (builtinMethodsWithSpecialGenericSignature.getSameAsBuiltinMethodWithErasedValueParameters(name)) {
|
||||
return (FunctionDescriptor) DescriptorUtilsKt.firstOverridden$default(functionDescriptor, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.BuiltinMethodsWithSpecialGenericSignature$getOverriddenBuiltinFunctionWithErasedValueParametersInJava$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
boolean hasErasedValueParametersInJava;
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
hasErasedValueParametersInJava = BuiltinMethodsWithSpecialGenericSignature.INSTANCE.getHasErasedValueParametersInJava(it);
|
||||
return Boolean.valueOf(hasErasedValueParametersInJava);
|
||||
}
|
||||
}, 1, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final SpecialGenericSignatures.SpecialSignatureInfo getSpecialSignatureInfo(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
CallableMemberDescriptor firstOverridden$default;
|
||||
String computeJvmSignature;
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
|
||||
SpecialGenericSignatures.Companion companion = SpecialGenericSignatures.Companion;
|
||||
if (!companion.getERASED_VALUE_PARAMETERS_SHORT_NAMES().contains(callableMemberDescriptor.getName()) || (firstOverridden$default = DescriptorUtilsKt.firstOverridden$default(callableMemberDescriptor, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.BuiltinMethodsWithSpecialGenericSignature$getSpecialSignatureInfo$builtinSignature$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
boolean z3;
|
||||
boolean hasErasedValueParametersInJava;
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
if (it instanceof FunctionDescriptor) {
|
||||
hasErasedValueParametersInJava = BuiltinMethodsWithSpecialGenericSignature.INSTANCE.getHasErasedValueParametersInJava(it);
|
||||
if (hasErasedValueParametersInJava) {
|
||||
z3 = true;
|
||||
return Boolean.valueOf(z3);
|
||||
}
|
||||
}
|
||||
z3 = false;
|
||||
return Boolean.valueOf(z3);
|
||||
}
|
||||
}, 1, null)) == null || (computeJvmSignature = MethodSignatureMappingKt.computeJvmSignature(firstOverridden$default)) == null) {
|
||||
return null;
|
||||
}
|
||||
return companion.getSpecialSignatureInfo(computeJvmSignature);
|
||||
}
|
||||
|
||||
public final boolean getSameAsBuiltinMethodWithErasedValueParameters(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "<this>");
|
||||
return SpecialGenericSignatures.Companion.getERASED_VALUE_PARAMETERS_SHORT_NAMES().contains(name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.jvm.JavaToKotlinClassMap;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nBuiltinSpecialProperties.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BuiltinSpecialProperties.kt\norg/jetbrains/kotlin/load/java/BuiltinSpecialProperties\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 4 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,47:1\n1549#2:48\n1620#2,3:49\n1490#2:52\n1520#2,3:53\n1523#2,3:63\n1238#2,4:68\n1549#2:75\n1620#2,3:76\n372#3,7:56\n453#3:66\n403#3:67\n152#4,3:72\n*S KotlinDebug\n*F\n+ 1 BuiltinSpecialProperties.kt\norg/jetbrains/kotlin/load/java/BuiltinSpecialProperties\n*L\n28#1:48\n28#1:49,3\n29#1:52\n29#1:53,3\n29#1:63,3\n30#1:68,4\n39#1:75\n39#1:76,3\n29#1:56,7\n30#1:66\n30#1:67\n34#1:72,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuiltinSpecialProperties {
|
||||
private static final Set<FqName> GETTER_FQ_NAMES;
|
||||
private static final Map<Name, List<Name>> GETTER_JVM_NAME_TO_PROPERTIES_SHORT_NAME_MAP;
|
||||
public static final BuiltinSpecialProperties INSTANCE = new BuiltinSpecialProperties();
|
||||
private static final Map<FqName, Name> PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP;
|
||||
private static final Set<FqName> SPECIAL_FQ_NAMES;
|
||||
private static final Set<Name> SPECIAL_SHORT_NAMES;
|
||||
|
||||
static {
|
||||
FqName childSafe;
|
||||
FqName childSafe2;
|
||||
FqName child;
|
||||
FqName child2;
|
||||
FqName childSafe3;
|
||||
FqName child3;
|
||||
FqName child4;
|
||||
FqName child5;
|
||||
int collectionSizeOrDefault;
|
||||
int collectionSizeOrDefault2;
|
||||
FqNameUnsafe fqNameUnsafe = StandardNames.FqNames._enum;
|
||||
childSafe = BuiltinSpecialPropertiesKt.childSafe(fqNameUnsafe, AppMeasurementSdk.ConditionalUserProperty.NAME);
|
||||
Pair pair = TuplesKt.to(childSafe, StandardNames.NAME);
|
||||
childSafe2 = BuiltinSpecialPropertiesKt.childSafe(fqNameUnsafe, "ordinal");
|
||||
Pair pair2 = TuplesKt.to(childSafe2, Name.identifier("ordinal"));
|
||||
child = BuiltinSpecialPropertiesKt.child(StandardNames.FqNames.collection, "size");
|
||||
Pair pair3 = TuplesKt.to(child, Name.identifier("size"));
|
||||
FqName fqName = StandardNames.FqNames.map;
|
||||
child2 = BuiltinSpecialPropertiesKt.child(fqName, "size");
|
||||
Pair pair4 = TuplesKt.to(child2, Name.identifier("size"));
|
||||
childSafe3 = BuiltinSpecialPropertiesKt.childSafe(StandardNames.FqNames.charSequence, "length");
|
||||
Pair pair5 = TuplesKt.to(childSafe3, Name.identifier("length"));
|
||||
child3 = BuiltinSpecialPropertiesKt.child(fqName, UserMetadata.KEYDATA_FILENAME);
|
||||
Pair pair6 = TuplesKt.to(child3, Name.identifier("keySet"));
|
||||
child4 = BuiltinSpecialPropertiesKt.child(fqName, "values");
|
||||
Pair pair7 = TuplesKt.to(child4, Name.identifier("values"));
|
||||
child5 = BuiltinSpecialPropertiesKt.child(fqName, RemoteConfigConstants.ResponseFieldKey.ENTRIES);
|
||||
Map<FqName, Name> mapOf = MapsKt.mapOf(pair, pair2, pair3, pair4, pair5, pair6, pair7, TuplesKt.to(child5, Name.identifier("entrySet")));
|
||||
PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP = mapOf;
|
||||
Set<Map.Entry<FqName, Name>> entrySet = mapOf.entrySet();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(entrySet, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = entrySet.iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry) it.next();
|
||||
arrayList.add(new Pair(((FqName) entry.getKey()).shortName(), entry.getValue()));
|
||||
}
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
Iterator it2 = arrayList.iterator();
|
||||
while (it2.hasNext()) {
|
||||
Pair pair8 = (Pair) it2.next();
|
||||
Name name = (Name) pair8.getSecond();
|
||||
Object obj = linkedHashMap.get(name);
|
||||
if (obj == null) {
|
||||
obj = new ArrayList();
|
||||
linkedHashMap.put(name, obj);
|
||||
}
|
||||
((List) obj).add((Name) pair8.getFirst());
|
||||
}
|
||||
LinkedHashMap linkedHashMap2 = new LinkedHashMap(MapsKt.mapCapacity(linkedHashMap.size()));
|
||||
for (Map.Entry entry2 : linkedHashMap.entrySet()) {
|
||||
linkedHashMap2.put(entry2.getKey(), CollectionsKt.distinct((Iterable) entry2.getValue()));
|
||||
}
|
||||
GETTER_JVM_NAME_TO_PROPERTIES_SHORT_NAME_MAP = linkedHashMap2;
|
||||
Map<FqName, Name> map = PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP;
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
for (Map.Entry<FqName, Name> entry3 : map.entrySet()) {
|
||||
JavaToKotlinClassMap javaToKotlinClassMap = JavaToKotlinClassMap.INSTANCE;
|
||||
FqNameUnsafe unsafe = entry3.getKey().parent().toUnsafe();
|
||||
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
|
||||
ClassId mapKotlinToJava = javaToKotlinClassMap.mapKotlinToJava(unsafe);
|
||||
Intrinsics.checkNotNull(mapKotlinToJava);
|
||||
linkedHashSet.add(mapKotlinToJava.asSingleFqName().child(entry3.getValue()));
|
||||
}
|
||||
GETTER_FQ_NAMES = linkedHashSet;
|
||||
Set<FqName> keySet = PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP.keySet();
|
||||
SPECIAL_FQ_NAMES = keySet;
|
||||
collectionSizeOrDefault2 = CollectionsKt__IterablesKt.collectionSizeOrDefault(keySet, 10);
|
||||
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault2);
|
||||
Iterator<T> it3 = keySet.iterator();
|
||||
while (it3.hasNext()) {
|
||||
arrayList2.add(((FqName) it3.next()).shortName());
|
||||
}
|
||||
SPECIAL_SHORT_NAMES = CollectionsKt.toSet(arrayList2);
|
||||
}
|
||||
|
||||
private BuiltinSpecialProperties() {
|
||||
}
|
||||
|
||||
public final Map<FqName, Name> getPROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP() {
|
||||
return PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP;
|
||||
}
|
||||
|
||||
public final List<Name> getPropertyNameCandidatesBySpecialGetterName(Name name1) {
|
||||
Intrinsics.checkNotNullParameter(name1, "name1");
|
||||
List<Name> list = GETTER_JVM_NAME_TO_PROPERTIES_SHORT_NAME_MAP.get(name1);
|
||||
return list == null ? CollectionsKt.emptyList() : list;
|
||||
}
|
||||
|
||||
public final Set<FqName> getSPECIAL_FQ_NAMES() {
|
||||
return SPECIAL_FQ_NAMES;
|
||||
}
|
||||
|
||||
public final Set<Name> getSPECIAL_SHORT_NAMES() {
|
||||
return SPECIAL_SHORT_NAMES;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BuiltinSpecialPropertiesKt {
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final FqName child(FqName fqName, String str) {
|
||||
return a.x(str, fqName, "child(...)");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final FqName childSafe(FqNameUnsafe fqNameUnsafe, String str) {
|
||||
FqName safe = fqNameUnsafe.child(Name.identifier(str)).toSafe();
|
||||
Intrinsics.checkNotNullExpressionValue(safe, "toSafe(...)");
|
||||
return safe;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nClassicBuiltinSpecialProperties.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ClassicBuiltinSpecialProperties.kt\norg/jetbrains/kotlin/load/java/ClassicBuiltinSpecialProperties\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,36:1\n1#2:37\n1747#3,3:38\n*S KotlinDebug\n*F\n+ 1 ClassicBuiltinSpecialProperties.kt\norg/jetbrains/kotlin/load/java/ClassicBuiltinSpecialProperties\n*L\n33#1:38,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ClassicBuiltinSpecialProperties {
|
||||
public static final ClassicBuiltinSpecialProperties INSTANCE = new ClassicBuiltinSpecialProperties();
|
||||
|
||||
private ClassicBuiltinSpecialProperties() {
|
||||
}
|
||||
|
||||
private final boolean hasBuiltinSpecialPropertyFqNameImpl(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
if (CollectionsKt.contains(BuiltinSpecialProperties.INSTANCE.getSPECIAL_FQ_NAMES(), DescriptorUtilsKt.fqNameOrNull(callableMemberDescriptor)) && callableMemberDescriptor.getValueParameters().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
if (!KotlinBuiltIns.isBuiltIn(callableMemberDescriptor)) {
|
||||
return false;
|
||||
}
|
||||
Collection<? extends CallableMemberDescriptor> overriddenDescriptors = callableMemberDescriptor.getOverriddenDescriptors();
|
||||
Intrinsics.checkNotNullExpressionValue(overriddenDescriptors, "getOverriddenDescriptors(...)");
|
||||
Collection<? extends CallableMemberDescriptor> collection = overriddenDescriptors;
|
||||
if (collection.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
for (CallableMemberDescriptor callableMemberDescriptor2 : collection) {
|
||||
ClassicBuiltinSpecialProperties classicBuiltinSpecialProperties = INSTANCE;
|
||||
Intrinsics.checkNotNull(callableMemberDescriptor2);
|
||||
if (classicBuiltinSpecialProperties.hasBuiltinSpecialPropertyFqName(callableMemberDescriptor2)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final String getBuiltinSpecialPropertyGetterName(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
Name name;
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
|
||||
KotlinBuiltIns.isBuiltIn(callableMemberDescriptor);
|
||||
CallableMemberDescriptor firstOverridden$default = DescriptorUtilsKt.firstOverridden$default(DescriptorUtilsKt.getPropertyIfAccessor(callableMemberDescriptor), false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.ClassicBuiltinSpecialProperties$getBuiltinSpecialPropertyGetterName$descriptor$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(ClassicBuiltinSpecialProperties.INSTANCE.hasBuiltinSpecialPropertyFqName(it));
|
||||
}
|
||||
}, 1, null);
|
||||
if (firstOverridden$default == null || (name = BuiltinSpecialProperties.INSTANCE.getPROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP().get(DescriptorUtilsKt.getFqNameSafe(firstOverridden$default))) == null) {
|
||||
return null;
|
||||
}
|
||||
return name.asString();
|
||||
}
|
||||
|
||||
public final boolean hasBuiltinSpecialPropertyFqName(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "callableMemberDescriptor");
|
||||
if (BuiltinSpecialProperties.INSTANCE.getSPECIAL_SHORT_NAMES().contains(callableMemberDescriptor.getName())) {
|
||||
return hasBuiltinSpecialPropertyFqNameImpl(callableMemberDescriptor);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.deprecation.DeprecationLevelValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.deprecation.DescriptorBasedDeprecationInfo;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DeprecationCausedByFunctionNInfo extends DescriptorBasedDeprecationInfo {
|
||||
private final DeclarationDescriptor target;
|
||||
|
||||
public DeprecationCausedByFunctionNInfo(DeclarationDescriptor target) {
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.deprecation.DeprecationInfo
|
||||
public DeprecationLevelValue getDeprecationLevel() {
|
||||
return DeprecationLevelValue.ERROR;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.CompanionObjectMapping;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.CompanionObjectMappingUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FieldDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DescriptorsJvmAbiUtil {
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i == 1 || i == 2) {
|
||||
objArr[0] = "companionObject";
|
||||
} else if (i != 3) {
|
||||
objArr[0] = "propertyDescriptor";
|
||||
} else {
|
||||
objArr[0] = "memberDescriptor";
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/DescriptorsJvmAbiUtil";
|
||||
if (i == 1) {
|
||||
objArr[2] = "isClassCompanionObjectWithBackingFieldsInOuter";
|
||||
} else if (i == 2) {
|
||||
objArr[2] = "isMappedIntrinsicCompanionObject";
|
||||
} else if (i != 3) {
|
||||
objArr[2] = "isPropertyWithBackingFieldInOuterClass";
|
||||
} else {
|
||||
objArr[2] = "hasJvmFieldAnnotation";
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
public static boolean hasJvmFieldAnnotation(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
FieldDescriptor backingField;
|
||||
if (callableMemberDescriptor == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if ((callableMemberDescriptor instanceof PropertyDescriptor) && (backingField = ((PropertyDescriptor) callableMemberDescriptor).getBackingField()) != null && backingField.getAnnotations().hasAnnotation(JvmAbi.JVM_FIELD_ANNOTATION_FQ_NAME)) {
|
||||
return true;
|
||||
}
|
||||
return callableMemberDescriptor.getAnnotations().hasAnnotation(JvmAbi.JVM_FIELD_ANNOTATION_FQ_NAME);
|
||||
}
|
||||
|
||||
public static boolean isClassCompanionObjectWithBackingFieldsInOuter(DeclarationDescriptor declarationDescriptor) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return DescriptorUtils.isCompanionObject(declarationDescriptor) && DescriptorUtils.isClassOrEnumClass(declarationDescriptor.getContainingDeclaration()) && !isMappedIntrinsicCompanionObject((ClassDescriptor) declarationDescriptor);
|
||||
}
|
||||
|
||||
public static boolean isMappedIntrinsicCompanionObject(ClassDescriptor classDescriptor) {
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
return CompanionObjectMappingUtilsKt.isMappedIntrinsicCompanionObject(CompanionObjectMapping.INSTANCE, classDescriptor);
|
||||
}
|
||||
|
||||
public static boolean isPropertyWithBackingFieldInOuterClass(PropertyDescriptor propertyDescriptor) {
|
||||
if (propertyDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (propertyDescriptor.getKind() == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
|
||||
return false;
|
||||
}
|
||||
if (isClassCompanionObjectWithBackingFieldsInOuter(propertyDescriptor.getContainingDeclaration())) {
|
||||
return true;
|
||||
}
|
||||
return DescriptorUtils.isCompanionObject(propertyDescriptor.getContainingDeclaration()) && hasJvmFieldAnnotation(propertyDescriptor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.RawSubstitution;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.RawTypeImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nErasedOverridabilityCondition.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ErasedOverridabilityCondition.kt\norg/jetbrains/kotlin/load/java/ErasedOverridabilityCondition\n+ 2 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n*L\n1#1,63:1\n1247#2,2:64\n*S KotlinDebug\n*F\n+ 1 ErasedOverridabilityCondition.kt\norg/jetbrains/kotlin/load/java/ErasedOverridabilityCondition\n*L\n44#1:64,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ErasedOverridabilityCondition implements ExternalOverridabilityCondition {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[OverridingUtil.OverrideCompatibilityInfo.Result.values().length];
|
||||
try {
|
||||
iArr[OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Contract getContract() {
|
||||
return ExternalOverridabilityCondition.Contract.SUCCESS_ONLY;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Result isOverridable(CallableDescriptor superDescriptor, CallableDescriptor subDescriptor, ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(superDescriptor, "superDescriptor");
|
||||
Intrinsics.checkNotNullParameter(subDescriptor, "subDescriptor");
|
||||
if (subDescriptor instanceof JavaMethodDescriptor) {
|
||||
JavaMethodDescriptor javaMethodDescriptor = (JavaMethodDescriptor) subDescriptor;
|
||||
List<TypeParameterDescriptor> typeParameters = javaMethodDescriptor.getTypeParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(typeParameters, "getTypeParameters(...)");
|
||||
if (typeParameters.isEmpty()) {
|
||||
OverridingUtil.OverrideCompatibilityInfo basicOverridabilityProblem = OverridingUtil.getBasicOverridabilityProblem(superDescriptor, subDescriptor);
|
||||
if ((basicOverridabilityProblem != null ? basicOverridabilityProblem.getResult() : null) != null) {
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
List<ValueParameterDescriptor> valueParameters = javaMethodDescriptor.getValueParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
|
||||
Sequence map = SequencesKt.map(CollectionsKt.asSequence(valueParameters), new Function1<ValueParameterDescriptor, KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition$isOverridable$signatureTypes$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final KotlinType invoke(ValueParameterDescriptor valueParameterDescriptor) {
|
||||
return valueParameterDescriptor.getType();
|
||||
}
|
||||
});
|
||||
KotlinType returnType = javaMethodDescriptor.getReturnType();
|
||||
Intrinsics.checkNotNull(returnType);
|
||||
Sequence plus = SequencesKt.plus((Sequence<? extends KotlinType>) map, returnType);
|
||||
ReceiverParameterDescriptor extensionReceiverParameter = javaMethodDescriptor.getExtensionReceiverParameter();
|
||||
for (KotlinType kotlinType : SequencesKt.plus(plus, (Iterable) CollectionsKt.listOfNotNull(extensionReceiverParameter != null ? extensionReceiverParameter.getType() : null))) {
|
||||
if (!kotlinType.getArguments().isEmpty() && !(kotlinType.unwrap() instanceof RawTypeImpl)) {
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
}
|
||||
CallableDescriptor substitute = superDescriptor.substitute(new RawSubstitution(null, 1, null).buildSubstitutor());
|
||||
if (substitute == null) {
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
if (substitute instanceof SimpleFunctionDescriptor) {
|
||||
SimpleFunctionDescriptor simpleFunctionDescriptor = (SimpleFunctionDescriptor) substitute;
|
||||
List<TypeParameterDescriptor> typeParameters2 = simpleFunctionDescriptor.getTypeParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(typeParameters2, "getTypeParameters(...)");
|
||||
if (!typeParameters2.isEmpty()) {
|
||||
substitute = simpleFunctionDescriptor.newCopyBuilder().setTypeParameters(CollectionsKt.emptyList()).build();
|
||||
Intrinsics.checkNotNull(substitute);
|
||||
}
|
||||
}
|
||||
OverridingUtil.OverrideCompatibilityInfo.Result result = OverridingUtil.DEFAULT.isOverridableByWithoutExternalConditions(substitute, subDescriptor, false).getResult();
|
||||
Intrinsics.checkNotNullExpressionValue(result, "getResult(...)");
|
||||
return WhenMappings.$EnumSwitchMapping$0[result.ordinal()] == 1 ? ExternalOverridabilityCondition.Result.OVERRIDABLE : ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
}
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.StandardClassIds;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nFakePureImplementationsProvider.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FakePureImplementationsProvider.kt\norg/jetbrains/kotlin/load/java/FakePureImplementationsProvider\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 4 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,38:1\n1285#2,4:39\n11065#3:43\n11400#3,3:44\n125#4:47\n152#4,3:48\n*S KotlinDebug\n*F\n+ 1 FakePureImplementationsProvider.kt\norg/jetbrains/kotlin/load/java/FakePureImplementationsProvider\n*L\n18#1:39,4\n36#1:43\n36#1:44,3\n32#1:47\n32#1:48,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FakePureImplementationsProvider {
|
||||
public static final FakePureImplementationsProvider INSTANCE;
|
||||
private static final Map<ClassId, ClassId> pureImplementationsClassIds;
|
||||
private static final Map<FqName, FqName> pureImplementationsFqNames;
|
||||
|
||||
static {
|
||||
FakePureImplementationsProvider fakePureImplementationsProvider = new FakePureImplementationsProvider();
|
||||
INSTANCE = fakePureImplementationsProvider;
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
pureImplementationsClassIds = linkedHashMap;
|
||||
StandardClassIds standardClassIds = StandardClassIds.INSTANCE;
|
||||
fakePureImplementationsProvider.implementedWith(standardClassIds.getMutableList(), fakePureImplementationsProvider.fqNameListOf("java.util.ArrayList", "java.util.LinkedList"));
|
||||
fakePureImplementationsProvider.implementedWith(standardClassIds.getMutableSet(), fakePureImplementationsProvider.fqNameListOf("java.util.HashSet", "java.util.TreeSet", "java.util.LinkedHashSet"));
|
||||
fakePureImplementationsProvider.implementedWith(standardClassIds.getMutableMap(), fakePureImplementationsProvider.fqNameListOf("java.util.HashMap", "java.util.TreeMap", "java.util.LinkedHashMap", "java.util.concurrent.ConcurrentHashMap", "java.util.concurrent.ConcurrentSkipListMap"));
|
||||
ClassId classId = ClassId.topLevel(new FqName("java.util.function.Function"));
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
fakePureImplementationsProvider.implementedWith(classId, fakePureImplementationsProvider.fqNameListOf("java.util.function.UnaryOperator"));
|
||||
ClassId classId2 = ClassId.topLevel(new FqName("java.util.function.BiFunction"));
|
||||
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
|
||||
fakePureImplementationsProvider.implementedWith(classId2, fakePureImplementationsProvider.fqNameListOf("java.util.function.BinaryOperator"));
|
||||
ArrayList arrayList = new ArrayList(linkedHashMap.size());
|
||||
for (Map.Entry entry : linkedHashMap.entrySet()) {
|
||||
arrayList.add(TuplesKt.to(((ClassId) entry.getKey()).asSingleFqName(), ((ClassId) entry.getValue()).asSingleFqName()));
|
||||
}
|
||||
pureImplementationsFqNames = MapsKt.toMap(arrayList);
|
||||
}
|
||||
|
||||
private FakePureImplementationsProvider() {
|
||||
}
|
||||
|
||||
private final List<ClassId> fqNameListOf(String... strArr) {
|
||||
ArrayList arrayList = new ArrayList(strArr.length);
|
||||
for (String str : strArr) {
|
||||
arrayList.add(ClassId.topLevel(new FqName(str)));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final void implementedWith(ClassId classId, List<ClassId> list) {
|
||||
Map<ClassId, ClassId> map = pureImplementationsClassIds;
|
||||
for (Object obj : list) {
|
||||
map.put(obj, classId);
|
||||
}
|
||||
}
|
||||
|
||||
public final FqName getPurelyImplementedInterface(FqName classFqName) {
|
||||
Intrinsics.checkNotNullParameter(classFqName, "classFqName");
|
||||
return pureImplementationsFqNames.get(classFqName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.JavaDescriptorUtilKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FieldOverridabilityCondition implements ExternalOverridabilityCondition {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Contract getContract() {
|
||||
return ExternalOverridabilityCondition.Contract.BOTH;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Result isOverridable(CallableDescriptor superDescriptor, CallableDescriptor subDescriptor, ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(superDescriptor, "superDescriptor");
|
||||
Intrinsics.checkNotNullParameter(subDescriptor, "subDescriptor");
|
||||
if (!(subDescriptor instanceof PropertyDescriptor) || !(superDescriptor instanceof PropertyDescriptor)) {
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
PropertyDescriptor propertyDescriptor = (PropertyDescriptor) subDescriptor;
|
||||
PropertyDescriptor propertyDescriptor2 = (PropertyDescriptor) superDescriptor;
|
||||
return !Intrinsics.areEqual(propertyDescriptor.getName(), propertyDescriptor2.getName()) ? ExternalOverridabilityCondition.Result.UNKNOWN : (JavaDescriptorUtilKt.isJavaField(propertyDescriptor) && JavaDescriptorUtilKt.isJavaField(propertyDescriptor2)) ? ExternalOverridabilityCondition.Result.OVERRIDABLE : (JavaDescriptorUtilKt.isJavaField(propertyDescriptor) || JavaDescriptorUtilKt.isJavaField(propertyDescriptor2)) ? ExternalOverridabilityCondition.Result.INCOMPATIBLE : ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class JavaClassFinder$$Util {
|
||||
public static /* synthetic */ JavaPackage findPackage$default(JavaClassFinder javaClassFinder, FqName fqName, boolean z3, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: findPackage");
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
z3 = true;
|
||||
}
|
||||
return javaClassFinder.findPackage(fqName, z3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClassFinder {
|
||||
JavaClass findClass(Request request);
|
||||
|
||||
JavaPackage findPackage(FqName fqName, boolean z3);
|
||||
|
||||
Set<String> knownClassNamesInPackage(FqName fqName);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Request {
|
||||
private final ClassId classId;
|
||||
private final JavaClass outerClass;
|
||||
private final byte[] previouslyFoundClassFileContent;
|
||||
|
||||
public Request(ClassId classId, byte[] bArr, JavaClass javaClass) {
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
this.classId = classId;
|
||||
this.previouslyFoundClassFileContent = bArr;
|
||||
this.outerClass = javaClass;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof Request)) {
|
||||
return false;
|
||||
}
|
||||
Request request = (Request) obj;
|
||||
return Intrinsics.areEqual(this.classId, request.classId) && Intrinsics.areEqual(this.previouslyFoundClassFileContent, request.previouslyFoundClassFileContent) && Intrinsics.areEqual(this.outerClass, request.outerClass);
|
||||
}
|
||||
|
||||
public final ClassId getClassId() {
|
||||
return this.classId;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = this.classId.hashCode() * 31;
|
||||
byte[] bArr = this.previouslyFoundClassFileContent;
|
||||
int hashCode2 = (hashCode + (bArr == null ? 0 : Arrays.hashCode(bArr))) * 31;
|
||||
JavaClass javaClass = this.outerClass;
|
||||
return hashCode2 + (javaClass != null ? javaClass.hashCode() : 0);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Request(classId=" + this.classId + ", previouslyFoundClassFileContent=" + Arrays.toString(this.previouslyFoundClassFileContent) + ", outerClass=" + this.outerClass + ')';
|
||||
}
|
||||
|
||||
public /* synthetic */ Request(ClassId classId, byte[] bArr, JavaClass javaClass, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(classId, (i & 2) != 0 ? null : bArr, (i & 4) != 0 ? null : javaClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaClassDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClassesTracker {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Default implements JavaClassesTracker {
|
||||
public static final Default INSTANCE = new Default();
|
||||
|
||||
private Default() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.JavaClassesTracker
|
||||
public void reportClass(JavaClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
|
||||
}
|
||||
}
|
||||
|
||||
void reportClass(JavaClassDescriptor javaClassDescriptor);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifier;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.NullabilityQualifierWithMigrationStatus;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaDefaultQualifiers {
|
||||
private final boolean definitelyNotNull;
|
||||
private final NullabilityQualifierWithMigrationStatus nullabilityQualifier;
|
||||
private final Collection<AnnotationQualifierApplicabilityType> qualifierApplicabilityTypes;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public JavaDefaultQualifiers(NullabilityQualifierWithMigrationStatus nullabilityQualifier, Collection<? extends AnnotationQualifierApplicabilityType> qualifierApplicabilityTypes, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(nullabilityQualifier, "nullabilityQualifier");
|
||||
Intrinsics.checkNotNullParameter(qualifierApplicabilityTypes, "qualifierApplicabilityTypes");
|
||||
this.nullabilityQualifier = nullabilityQualifier;
|
||||
this.qualifierApplicabilityTypes = qualifierApplicabilityTypes;
|
||||
this.definitelyNotNull = z3;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public static /* synthetic */ JavaDefaultQualifiers copy$default(JavaDefaultQualifiers javaDefaultQualifiers, NullabilityQualifierWithMigrationStatus nullabilityQualifierWithMigrationStatus, Collection collection, boolean z3, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
nullabilityQualifierWithMigrationStatus = javaDefaultQualifiers.nullabilityQualifier;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
collection = javaDefaultQualifiers.qualifierApplicabilityTypes;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
z3 = javaDefaultQualifiers.definitelyNotNull;
|
||||
}
|
||||
return javaDefaultQualifiers.copy(nullabilityQualifierWithMigrationStatus, collection, z3);
|
||||
}
|
||||
|
||||
public final JavaDefaultQualifiers copy(NullabilityQualifierWithMigrationStatus nullabilityQualifier, Collection<? extends AnnotationQualifierApplicabilityType> qualifierApplicabilityTypes, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(nullabilityQualifier, "nullabilityQualifier");
|
||||
Intrinsics.checkNotNullParameter(qualifierApplicabilityTypes, "qualifierApplicabilityTypes");
|
||||
return new JavaDefaultQualifiers(nullabilityQualifier, qualifierApplicabilityTypes, z3);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof JavaDefaultQualifiers)) {
|
||||
return false;
|
||||
}
|
||||
JavaDefaultQualifiers javaDefaultQualifiers = (JavaDefaultQualifiers) obj;
|
||||
return Intrinsics.areEqual(this.nullabilityQualifier, javaDefaultQualifiers.nullabilityQualifier) && Intrinsics.areEqual(this.qualifierApplicabilityTypes, javaDefaultQualifiers.qualifierApplicabilityTypes) && this.definitelyNotNull == javaDefaultQualifiers.definitelyNotNull;
|
||||
}
|
||||
|
||||
public final boolean getDefinitelyNotNull() {
|
||||
return this.definitelyNotNull;
|
||||
}
|
||||
|
||||
public final NullabilityQualifierWithMigrationStatus getNullabilityQualifier() {
|
||||
return this.nullabilityQualifier;
|
||||
}
|
||||
|
||||
public final Collection<AnnotationQualifierApplicabilityType> getQualifierApplicabilityTypes() {
|
||||
return this.qualifierApplicabilityTypes;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Boolean.hashCode(this.definitelyNotNull) + ((this.qualifierApplicabilityTypes.hashCode() + (this.nullabilityQualifier.hashCode() * 31)) * 31);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "JavaDefaultQualifiers(nullabilityQualifier=" + this.nullabilityQualifier + ", qualifierApplicabilityTypes=" + this.qualifierApplicabilityTypes + ", definitelyNotNull=" + this.definitelyNotNull + ')';
|
||||
}
|
||||
|
||||
public /* synthetic */ JavaDefaultQualifiers(NullabilityQualifierWithMigrationStatus nullabilityQualifierWithMigrationStatus, Collection collection, boolean z3, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(nullabilityQualifierWithMigrationStatus, collection, (i & 4) != 0 ? nullabilityQualifierWithMigrationStatus.getQualifier() == NullabilityQualifier.NOT_NULL : z3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DelegatedDescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Visibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.java.JavaVisibilities;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class JavaDescriptorVisibilities {
|
||||
public static final DescriptorVisibility PACKAGE_VISIBILITY;
|
||||
public static final DescriptorVisibility PROTECTED_AND_PACKAGE;
|
||||
public static final DescriptorVisibility PROTECTED_STATIC_VISIBILITY;
|
||||
private static final Map<Visibility, DescriptorVisibility> visibilitiesMapping;
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = (i == 5 || i == 6) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
|
||||
Object[] objArr = new Object[(i == 5 || i == 6) ? 2 : 3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
break;
|
||||
case 2:
|
||||
objArr[0] = "first";
|
||||
break;
|
||||
case 3:
|
||||
objArr[0] = "second";
|
||||
break;
|
||||
case 4:
|
||||
objArr[0] = "visibility";
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities";
|
||||
break;
|
||||
default:
|
||||
objArr[0] = "what";
|
||||
break;
|
||||
}
|
||||
if (i == 5 || i == 6) {
|
||||
objArr[1] = "toDescriptorVisibility";
|
||||
} else {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities";
|
||||
}
|
||||
if (i == 2 || i == 3) {
|
||||
objArr[2] = "areInSamePackage";
|
||||
} else if (i == 4) {
|
||||
objArr[2] = "toDescriptorVisibility";
|
||||
} else if (i != 5 && i != 6) {
|
||||
objArr[2] = "isVisibleForProtectedAndPackage";
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i != 5 && i != 6) {
|
||||
throw new IllegalArgumentException(format);
|
||||
}
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
|
||||
static {
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility = new DelegatedDescriptorVisibility(JavaVisibilities.PackageVisibility.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.load.java.JavaDescriptorVisibilities.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$1";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return JavaDescriptorVisibilities.areInSamePackage(declarationDescriptorWithVisibility, declarationDescriptor);
|
||||
}
|
||||
};
|
||||
PACKAGE_VISIBILITY = delegatedDescriptorVisibility;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility2 = new DelegatedDescriptorVisibility(JavaVisibilities.ProtectedStaticVisibility.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.load.java.JavaDescriptorVisibilities.2
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$2";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return JavaDescriptorVisibilities.isVisibleForProtectedAndPackage(receiverValue, declarationDescriptorWithVisibility, declarationDescriptor);
|
||||
}
|
||||
};
|
||||
PROTECTED_STATIC_VISIBILITY = delegatedDescriptorVisibility2;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility3 = new DelegatedDescriptorVisibility(JavaVisibilities.ProtectedAndPackage.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.load.java.JavaDescriptorVisibilities.3
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/JavaDescriptorVisibilities$3";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return JavaDescriptorVisibilities.isVisibleForProtectedAndPackage(receiverValue, declarationDescriptorWithVisibility, declarationDescriptor);
|
||||
}
|
||||
};
|
||||
PROTECTED_AND_PACKAGE = delegatedDescriptorVisibility3;
|
||||
visibilitiesMapping = new HashMap();
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility2);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility3);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static boolean areInSamePackage(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (declarationDescriptor2 == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
PackageFragmentDescriptor packageFragmentDescriptor = (PackageFragmentDescriptor) DescriptorUtils.getParentOfType(declarationDescriptor, PackageFragmentDescriptor.class, false);
|
||||
PackageFragmentDescriptor packageFragmentDescriptor2 = (PackageFragmentDescriptor) DescriptorUtils.getParentOfType(declarationDescriptor2, PackageFragmentDescriptor.class, false);
|
||||
return (packageFragmentDescriptor2 == null || packageFragmentDescriptor == null || !packageFragmentDescriptor.getFqName().equals(packageFragmentDescriptor2.getFqName())) ? false : true;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static boolean isVisibleForProtectedAndPackage(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (areInSamePackage(DescriptorUtils.unwrapFakeOverrideToAnyDeclaration(declarationDescriptorWithVisibility), declarationDescriptor)) {
|
||||
return true;
|
||||
}
|
||||
return DescriptorVisibilities.PROTECTED.isVisible(receiverValue, declarationDescriptorWithVisibility, declarationDescriptor, false);
|
||||
}
|
||||
|
||||
private static void recordVisibilityMapping(DescriptorVisibility descriptorVisibility) {
|
||||
visibilitiesMapping.put(descriptorVisibility.getDelegate(), descriptorVisibility);
|
||||
}
|
||||
|
||||
public static DescriptorVisibility toDescriptorVisibility(Visibility visibility) {
|
||||
if (visibility == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
DescriptorVisibility descriptorVisibility = visibilitiesMapping.get(visibility);
|
||||
if (descriptorVisibility != null) {
|
||||
return descriptorVisibility;
|
||||
}
|
||||
DescriptorVisibility descriptorVisibility2 = DescriptorVisibilities.toDescriptorVisibility(visibility);
|
||||
if (descriptorVisibility2 == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
return descriptorVisibility2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.SpecialGenericSignatures;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureMappingKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaIncompatibilityRulesOverridabilityCondition implements ExternalOverridabilityCondition {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private final boolean isPrimitiveCompareTo(FunctionDescriptor functionDescriptor) {
|
||||
if (functionDescriptor.getValueParameters().size() != 1) {
|
||||
return false;
|
||||
}
|
||||
DeclarationDescriptor containingDeclaration = functionDescriptor.getContainingDeclaration();
|
||||
ClassDescriptor classDescriptor = containingDeclaration instanceof ClassDescriptor ? (ClassDescriptor) containingDeclaration : null;
|
||||
if (classDescriptor == null) {
|
||||
return false;
|
||||
}
|
||||
List<ValueParameterDescriptor> valueParameters = functionDescriptor.getValueParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = ((ValueParameterDescriptor) CollectionsKt.single((List) valueParameters)).getType().getConstructor().mo1394getDeclarationDescriptor();
|
||||
ClassDescriptor classDescriptor2 = mo1394getDeclarationDescriptor instanceof ClassDescriptor ? (ClassDescriptor) mo1394getDeclarationDescriptor : null;
|
||||
return classDescriptor2 != null && KotlinBuiltIns.isPrimitiveClass(classDescriptor) && Intrinsics.areEqual(DescriptorUtilsKt.getFqNameSafe(classDescriptor), DescriptorUtilsKt.getFqNameSafe(classDescriptor2));
|
||||
}
|
||||
|
||||
private final JvmType mapValueParameterType(FunctionDescriptor functionDescriptor, ValueParameterDescriptor valueParameterDescriptor) {
|
||||
if (MethodSignatureMappingKt.forceSingleValueParameterBoxing(functionDescriptor) || isPrimitiveCompareTo(functionDescriptor)) {
|
||||
KotlinType type = valueParameterDescriptor.getType();
|
||||
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
|
||||
return MethodSignatureMappingKt.mapToJvmType(TypeUtilsKt.makeNullable(type));
|
||||
}
|
||||
KotlinType type2 = valueParameterDescriptor.getType();
|
||||
Intrinsics.checkNotNullExpressionValue(type2, "getType(...)");
|
||||
return MethodSignatureMappingKt.mapToJvmType(type2);
|
||||
}
|
||||
|
||||
public final boolean doesJavaOverrideHaveIncompatibleValueParameterKinds(CallableDescriptor superDescriptor, CallableDescriptor subDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(superDescriptor, "superDescriptor");
|
||||
Intrinsics.checkNotNullParameter(subDescriptor, "subDescriptor");
|
||||
if ((subDescriptor instanceof JavaMethodDescriptor) && (superDescriptor instanceof FunctionDescriptor)) {
|
||||
JavaMethodDescriptor javaMethodDescriptor = (JavaMethodDescriptor) subDescriptor;
|
||||
javaMethodDescriptor.getValueParameters().size();
|
||||
FunctionDescriptor functionDescriptor = (FunctionDescriptor) superDescriptor;
|
||||
functionDescriptor.getValueParameters().size();
|
||||
List<ValueParameterDescriptor> valueParameters = javaMethodDescriptor.getOriginal().getValueParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
|
||||
List<ValueParameterDescriptor> valueParameters2 = functionDescriptor.getOriginal().getValueParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(valueParameters2, "getValueParameters(...)");
|
||||
for (Pair pair : CollectionsKt.zip(valueParameters, valueParameters2)) {
|
||||
ValueParameterDescriptor valueParameterDescriptor = (ValueParameterDescriptor) pair.component1();
|
||||
ValueParameterDescriptor valueParameterDescriptor2 = (ValueParameterDescriptor) pair.component2();
|
||||
Intrinsics.checkNotNull(valueParameterDescriptor);
|
||||
boolean z3 = mapValueParameterType((FunctionDescriptor) subDescriptor, valueParameterDescriptor) instanceof JvmType.Primitive;
|
||||
Intrinsics.checkNotNull(valueParameterDescriptor2);
|
||||
if (z3 != (mapValueParameterType(functionDescriptor, valueParameterDescriptor2) instanceof JvmType.Primitive)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
private final boolean isIncompatibleInAccordanceWithBuiltInOverridabilityRules(CallableDescriptor callableDescriptor, CallableDescriptor callableDescriptor2, ClassDescriptor classDescriptor) {
|
||||
if ((callableDescriptor instanceof CallableMemberDescriptor) && (callableDescriptor2 instanceof FunctionDescriptor) && !KotlinBuiltIns.isBuiltIn(callableDescriptor2)) {
|
||||
BuiltinMethodsWithSpecialGenericSignature builtinMethodsWithSpecialGenericSignature = BuiltinMethodsWithSpecialGenericSignature.INSTANCE;
|
||||
FunctionDescriptor functionDescriptor = (FunctionDescriptor) callableDescriptor2;
|
||||
Name name = functionDescriptor.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
if (!builtinMethodsWithSpecialGenericSignature.getSameAsBuiltinMethodWithErasedValueParameters(name)) {
|
||||
SpecialGenericSignatures.Companion companion = SpecialGenericSignatures.Companion;
|
||||
Name name2 = functionDescriptor.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name2, "getName(...)");
|
||||
if (!companion.getSameAsRenamedInJvmBuiltin(name2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
CallableMemberDescriptor overriddenSpecialBuiltin = SpecialBuiltinMembers.getOverriddenSpecialBuiltin((CallableMemberDescriptor) callableDescriptor);
|
||||
boolean z3 = callableDescriptor instanceof FunctionDescriptor;
|
||||
FunctionDescriptor functionDescriptor2 = z3 ? (FunctionDescriptor) callableDescriptor : null;
|
||||
if (!(functionDescriptor2 != null && functionDescriptor.isHiddenToOvercomeSignatureClash() == functionDescriptor2.isHiddenToOvercomeSignatureClash()) && (overriddenSpecialBuiltin == null || !functionDescriptor.isHiddenToOvercomeSignatureClash())) {
|
||||
return true;
|
||||
}
|
||||
if ((classDescriptor instanceof JavaClassDescriptor) && functionDescriptor.getInitialSignatureDescriptor() == null && overriddenSpecialBuiltin != null && !SpecialBuiltinMembers.hasRealKotlinSuperClassWithOverrideOf(classDescriptor, overriddenSpecialBuiltin)) {
|
||||
if ((overriddenSpecialBuiltin instanceof FunctionDescriptor) && z3 && BuiltinMethodsWithSpecialGenericSignature.getOverriddenBuiltinFunctionWithErasedValueParametersInJava((FunctionDescriptor) overriddenSpecialBuiltin) != null) {
|
||||
String computeJvmDescriptor$default = MethodSignatureMappingKt.computeJvmDescriptor$default(functionDescriptor, false, false, 2, null);
|
||||
FunctionDescriptor original = ((FunctionDescriptor) callableDescriptor).getOriginal();
|
||||
Intrinsics.checkNotNullExpressionValue(original, "getOriginal(...)");
|
||||
if (Intrinsics.areEqual(computeJvmDescriptor$default, MethodSignatureMappingKt.computeJvmDescriptor$default(original, false, false, 2, null))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Contract getContract() {
|
||||
return ExternalOverridabilityCondition.Contract.CONFLICTS_ONLY;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition
|
||||
public ExternalOverridabilityCondition.Result isOverridable(CallableDescriptor superDescriptor, CallableDescriptor subDescriptor, ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(superDescriptor, "superDescriptor");
|
||||
Intrinsics.checkNotNullParameter(subDescriptor, "subDescriptor");
|
||||
if (!isIncompatibleInAccordanceWithBuiltInOverridabilityRules(superDescriptor, subDescriptor, classDescriptor) && !Companion.doesJavaOverrideHaveIncompatibleValueParameterKinds(superDescriptor, subDescriptor)) {
|
||||
return ExternalOverridabilityCondition.Result.UNKNOWN;
|
||||
}
|
||||
return ExternalOverridabilityCondition.Result.INCOMPATIBLE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaModuleAnnotationsProvider {
|
||||
List<JavaAnnotation> getAnnotationsForModuleOwnerOfClass(ClassId classId);
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import C.w;
|
||||
import kotlin.KotlinVersion;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaNullabilityAnnotationsStatus;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJavaNullabilityAnnotationSettings.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaNullabilityAnnotationSettings.kt\norg/jetbrains/kotlin/load/java/JavaNullabilityAnnotationSettingsKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,119:1\n1#2:120\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaNullabilityAnnotationSettingsKt {
|
||||
private static final FqName CHECKER_FRAMEWORK_COMPATQUAL_ANNOTATIONS_PACKAGE;
|
||||
private static final FqName JSPECIFY_ANNOTATIONS_PACKAGE;
|
||||
private static final FqName JSPECIFY_OLD_ANNOTATIONS_PACKAGE;
|
||||
private static final JavaNullabilityAnnotationsStatus JSR_305_DEFAULT_SETTINGS;
|
||||
private static final NullabilityAnnotationStates<JavaNullabilityAnnotationsStatus> NULLABILITY_ANNOTATION_SETTINGS;
|
||||
private static final FqName[] RXJAVA3_ANNOTATIONS;
|
||||
private static final FqName RXJAVA3_ANNOTATIONS_PACKAGE;
|
||||
private static final String RXJAVA3_ANNOTATIONS_PACKAGE_NAME;
|
||||
|
||||
static {
|
||||
FqName fqName = new FqName("org.jspecify.nullness");
|
||||
JSPECIFY_OLD_ANNOTATIONS_PACKAGE = fqName;
|
||||
FqName fqName2 = new FqName("org.jspecify.annotations");
|
||||
JSPECIFY_ANNOTATIONS_PACKAGE = fqName2;
|
||||
FqName fqName3 = new FqName("io.reactivex.rxjava3.annotations");
|
||||
RXJAVA3_ANNOTATIONS_PACKAGE = fqName3;
|
||||
FqName fqName4 = new FqName("org.checkerframework.checker.nullness.compatqual");
|
||||
CHECKER_FRAMEWORK_COMPATQUAL_ANNOTATIONS_PACKAGE = fqName4;
|
||||
String asString = fqName3.asString();
|
||||
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
|
||||
RXJAVA3_ANNOTATIONS_PACKAGE_NAME = asString;
|
||||
RXJAVA3_ANNOTATIONS = new FqName[]{new FqName(w.n(asString, ".Nullable")), new FqName(w.n(asString, ".NonNull"))};
|
||||
FqName fqName5 = new FqName("org.jetbrains.annotations");
|
||||
JavaNullabilityAnnotationsStatus.Companion companion = JavaNullabilityAnnotationsStatus.Companion;
|
||||
Pair pair = TuplesKt.to(fqName5, companion.getDEFAULT());
|
||||
Pair pair2 = TuplesKt.to(new FqName("androidx.annotation"), companion.getDEFAULT());
|
||||
Pair pair3 = TuplesKt.to(new FqName("android.support.annotation"), companion.getDEFAULT());
|
||||
Pair pair4 = TuplesKt.to(new FqName("android.annotation"), companion.getDEFAULT());
|
||||
Pair pair5 = TuplesKt.to(new FqName("com.android.annotations"), companion.getDEFAULT());
|
||||
Pair pair6 = TuplesKt.to(new FqName("org.eclipse.jdt.annotation"), companion.getDEFAULT());
|
||||
Pair pair7 = TuplesKt.to(new FqName("org.checkerframework.checker.nullness.qual"), companion.getDEFAULT());
|
||||
Pair pair8 = TuplesKt.to(fqName4, companion.getDEFAULT());
|
||||
Pair pair9 = TuplesKt.to(new FqName("javax.annotation"), companion.getDEFAULT());
|
||||
Pair pair10 = TuplesKt.to(new FqName("edu.umd.cs.findbugs.annotations"), companion.getDEFAULT());
|
||||
Pair pair11 = TuplesKt.to(new FqName("io.reactivex.annotations"), companion.getDEFAULT());
|
||||
FqName fqName6 = new FqName("androidx.annotation.RecentlyNullable");
|
||||
ReportLevel reportLevel = ReportLevel.WARN;
|
||||
Pair pair12 = TuplesKt.to(fqName6, new JavaNullabilityAnnotationsStatus(reportLevel, null, null, 4, null));
|
||||
Pair pair13 = TuplesKt.to(new FqName("androidx.annotation.RecentlyNonNull"), new JavaNullabilityAnnotationsStatus(reportLevel, null, null, 4, null));
|
||||
Pair pair14 = TuplesKt.to(new FqName("lombok"), companion.getDEFAULT());
|
||||
KotlinVersion kotlinVersion = new KotlinVersion(2, 0);
|
||||
ReportLevel reportLevel2 = ReportLevel.STRICT;
|
||||
NULLABILITY_ANNOTATION_SETTINGS = new NullabilityAnnotationStatesImpl(MapsKt.mapOf(pair, pair2, pair3, pair4, pair5, pair6, pair7, pair8, pair9, pair10, pair11, pair12, pair13, pair14, TuplesKt.to(fqName, new JavaNullabilityAnnotationsStatus(reportLevel, kotlinVersion, reportLevel2)), TuplesKt.to(fqName2, new JavaNullabilityAnnotationsStatus(reportLevel, new KotlinVersion(2, 0), reportLevel2)), TuplesKt.to(fqName3, new JavaNullabilityAnnotationsStatus(reportLevel, new KotlinVersion(1, 8), reportLevel2))));
|
||||
JSR_305_DEFAULT_SETTINGS = new JavaNullabilityAnnotationsStatus(reportLevel, null, null, 4, null);
|
||||
}
|
||||
|
||||
public static final Jsr305Settings getDefaultJsr305Settings(KotlinVersion configuredKotlinVersion) {
|
||||
Intrinsics.checkNotNullParameter(configuredKotlinVersion, "configuredKotlinVersion");
|
||||
JavaNullabilityAnnotationsStatus javaNullabilityAnnotationsStatus = JSR_305_DEFAULT_SETTINGS;
|
||||
ReportLevel reportLevelBefore = (javaNullabilityAnnotationsStatus.getSinceVersion() == null || javaNullabilityAnnotationsStatus.getSinceVersion().compareTo(configuredKotlinVersion) > 0) ? javaNullabilityAnnotationsStatus.getReportLevelBefore() : javaNullabilityAnnotationsStatus.getReportLevelAfter();
|
||||
return new Jsr305Settings(reportLevelBefore, getDefaultMigrationJsr305ReportLevelForGivenGlobal(reportLevelBefore), null, 4, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ Jsr305Settings getDefaultJsr305Settings$default(KotlinVersion kotlinVersion, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
kotlinVersion = KotlinVersion.CURRENT;
|
||||
}
|
||||
return getDefaultJsr305Settings(kotlinVersion);
|
||||
}
|
||||
|
||||
public static final ReportLevel getDefaultMigrationJsr305ReportLevelForGivenGlobal(ReportLevel globalReportLevel) {
|
||||
Intrinsics.checkNotNullParameter(globalReportLevel, "globalReportLevel");
|
||||
if (globalReportLevel == ReportLevel.WARN) {
|
||||
return null;
|
||||
}
|
||||
return globalReportLevel;
|
||||
}
|
||||
|
||||
public static final ReportLevel getDefaultReportLevelForAnnotation(FqName annotationFqName) {
|
||||
Intrinsics.checkNotNullParameter(annotationFqName, "annotationFqName");
|
||||
return getReportLevelForAnnotation$default(annotationFqName, NullabilityAnnotationStates.Companion.getEMPTY(), null, 4, null);
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_ANNOTATIONS_PACKAGE() {
|
||||
return JSPECIFY_ANNOTATIONS_PACKAGE;
|
||||
}
|
||||
|
||||
public static final FqName[] getRXJAVA3_ANNOTATIONS() {
|
||||
return RXJAVA3_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final ReportLevel getReportLevelForAnnotation(FqName annotation, NullabilityAnnotationStates<? extends ReportLevel> configuredReportLevels, KotlinVersion configuredKotlinVersion) {
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
Intrinsics.checkNotNullParameter(configuredReportLevels, "configuredReportLevels");
|
||||
Intrinsics.checkNotNullParameter(configuredKotlinVersion, "configuredKotlinVersion");
|
||||
ReportLevel reportLevel = configuredReportLevels.get(annotation);
|
||||
if (reportLevel != null) {
|
||||
return reportLevel;
|
||||
}
|
||||
JavaNullabilityAnnotationsStatus javaNullabilityAnnotationsStatus = NULLABILITY_ANNOTATION_SETTINGS.get(annotation);
|
||||
return javaNullabilityAnnotationsStatus == null ? ReportLevel.IGNORE : (javaNullabilityAnnotationsStatus.getSinceVersion() == null || javaNullabilityAnnotationsStatus.getSinceVersion().compareTo(configuredKotlinVersion) > 0) ? javaNullabilityAnnotationsStatus.getReportLevelBefore() : javaNullabilityAnnotationsStatus.getReportLevelAfter();
|
||||
}
|
||||
|
||||
public static /* synthetic */ ReportLevel getReportLevelForAnnotation$default(FqName fqName, NullabilityAnnotationStates nullabilityAnnotationStates, KotlinVersion kotlinVersion, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
kotlinVersion = new KotlinVersion(1, 7, 20);
|
||||
}
|
||||
return getReportLevelForAnnotation(fqName, nullabilityAnnotationStates, kotlinVersion);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.KotlinVersion;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaNullabilityAnnotationsStatus {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final JavaNullabilityAnnotationsStatus DEFAULT = new JavaNullabilityAnnotationsStatus(ReportLevel.STRICT, null, null, 6, null);
|
||||
private final ReportLevel reportLevelAfter;
|
||||
private final ReportLevel reportLevelBefore;
|
||||
private final KotlinVersion sinceVersion;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final JavaNullabilityAnnotationsStatus getDEFAULT() {
|
||||
return JavaNullabilityAnnotationsStatus.DEFAULT;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
public JavaNullabilityAnnotationsStatus(ReportLevel reportLevelBefore, KotlinVersion kotlinVersion, ReportLevel reportLevelAfter) {
|
||||
Intrinsics.checkNotNullParameter(reportLevelBefore, "reportLevelBefore");
|
||||
Intrinsics.checkNotNullParameter(reportLevelAfter, "reportLevelAfter");
|
||||
this.reportLevelBefore = reportLevelBefore;
|
||||
this.sinceVersion = kotlinVersion;
|
||||
this.reportLevelAfter = reportLevelAfter;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof JavaNullabilityAnnotationsStatus)) {
|
||||
return false;
|
||||
}
|
||||
JavaNullabilityAnnotationsStatus javaNullabilityAnnotationsStatus = (JavaNullabilityAnnotationsStatus) obj;
|
||||
return this.reportLevelBefore == javaNullabilityAnnotationsStatus.reportLevelBefore && Intrinsics.areEqual(this.sinceVersion, javaNullabilityAnnotationsStatus.sinceVersion) && this.reportLevelAfter == javaNullabilityAnnotationsStatus.reportLevelAfter;
|
||||
}
|
||||
|
||||
public final ReportLevel getReportLevelAfter() {
|
||||
return this.reportLevelAfter;
|
||||
}
|
||||
|
||||
public final ReportLevel getReportLevelBefore() {
|
||||
return this.reportLevelBefore;
|
||||
}
|
||||
|
||||
public final KotlinVersion getSinceVersion() {
|
||||
return this.sinceVersion;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = this.reportLevelBefore.hashCode() * 31;
|
||||
KotlinVersion kotlinVersion = this.sinceVersion;
|
||||
return this.reportLevelAfter.hashCode() + ((hashCode + (kotlinVersion == null ? 0 : kotlinVersion.getVersion())) * 31);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "JavaNullabilityAnnotationsStatus(reportLevelBefore=" + this.reportLevelBefore + ", sinceVersion=" + this.sinceVersion + ", reportLevelAfter=" + this.reportLevelAfter + ')';
|
||||
}
|
||||
|
||||
public /* synthetic */ JavaNullabilityAnnotationsStatus(ReportLevel reportLevel, KotlinVersion kotlinVersion, ReportLevel reportLevel2, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(reportLevel, (i & 2) != 0 ? new KotlinVersion(1, 0) : kotlinVersion, (i & 4) != 0 ? reportLevel : reportLevel2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReference;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KDeclarationContainer;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class JavaTypeEnhancementState$Companion$DEFAULT$1 extends FunctionReference implements Function1<FqName, ReportLevel> {
|
||||
public static final JavaTypeEnhancementState$Companion$DEFAULT$1 INSTANCE = new JavaTypeEnhancementState$Companion$DEFAULT$1();
|
||||
|
||||
public JavaTypeEnhancementState$Companion$DEFAULT$1() {
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
|
||||
public final String getName() {
|
||||
return "getDefaultReportLevelForAnnotation";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final KDeclarationContainer getOwner() {
|
||||
return Reflection.getOrCreateKotlinPackage(JavaNullabilityAnnotationSettingsKt.class, "compiler.common.jvm");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final String getSignature() {
|
||||
return "getDefaultReportLevelForAnnotation(Lorg/jetbrains/kotlin/name/FqName;)Lorg/jetbrains/kotlin/load/java/ReportLevel;";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final ReportLevel invoke(FqName p02) {
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
return JavaNullabilityAnnotationSettingsKt.getDefaultReportLevelForAnnotation(p02);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeEnhancementState {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final JavaTypeEnhancementState DEFAULT = new JavaTypeEnhancementState(JavaNullabilityAnnotationSettingsKt.getDefaultJsr305Settings$default(null, 1, null), JavaTypeEnhancementState$Companion$DEFAULT$1.INSTANCE);
|
||||
private final boolean disabledDefaultAnnotations;
|
||||
private final Function1<FqName, ReportLevel> getReportLevelForAnnotation;
|
||||
private final Jsr305Settings jsr305;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final JavaTypeEnhancementState getDEFAULT() {
|
||||
return JavaTypeEnhancementState.DEFAULT;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public JavaTypeEnhancementState(Jsr305Settings jsr305, Function1<? super FqName, ? extends ReportLevel> getReportLevelForAnnotation) {
|
||||
Intrinsics.checkNotNullParameter(jsr305, "jsr305");
|
||||
Intrinsics.checkNotNullParameter(getReportLevelForAnnotation, "getReportLevelForAnnotation");
|
||||
this.jsr305 = jsr305;
|
||||
this.getReportLevelForAnnotation = getReportLevelForAnnotation;
|
||||
this.disabledDefaultAnnotations = jsr305.isDisabled() || getReportLevelForAnnotation.invoke(JavaNullabilityAnnotationSettingsKt.getJSPECIFY_ANNOTATIONS_PACKAGE()) == ReportLevel.IGNORE;
|
||||
}
|
||||
|
||||
public final boolean getDisabledDefaultAnnotations() {
|
||||
return this.disabledDefaultAnnotations;
|
||||
}
|
||||
|
||||
public final Function1<FqName, ReportLevel> getGetReportLevelForAnnotation() {
|
||||
return this.getReportLevelForAnnotation;
|
||||
}
|
||||
|
||||
public final Jsr305Settings getJsr305() {
|
||||
return this.jsr305;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "JavaTypeEnhancementState(jsr305=" + this.jsr305 + ", getReportLevelForAnnotation=" + this.getReportLevelForAnnotation + ')';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeQualifiersByElementType {
|
||||
private final EnumMap<AnnotationQualifierApplicabilityType, JavaDefaultQualifiers> defaultQualifiers;
|
||||
|
||||
public JavaTypeQualifiersByElementType(EnumMap<AnnotationQualifierApplicabilityType, JavaDefaultQualifiers> defaultQualifiers) {
|
||||
Intrinsics.checkNotNullParameter(defaultQualifiers, "defaultQualifiers");
|
||||
this.defaultQualifiers = defaultQualifiers;
|
||||
}
|
||||
|
||||
public final JavaDefaultQualifiers get(AnnotationQualifierApplicabilityType annotationQualifierApplicabilityType) {
|
||||
return this.defaultQualifiers.get(annotationQualifierApplicabilityType);
|
||||
}
|
||||
|
||||
public final EnumMap<AnnotationQualifierApplicabilityType, JavaDefaultQualifiers> getDefaultQualifiers() {
|
||||
return this.defaultQualifiers;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.LazyKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Jsr305Settings {
|
||||
private final Lazy description$delegate;
|
||||
private final ReportLevel globalLevel;
|
||||
private final boolean isDisabled;
|
||||
private final ReportLevel migrationLevel;
|
||||
private final Map<FqName, ReportLevel> userDefinedLevelForSpecificAnnotation;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public Jsr305Settings(ReportLevel globalLevel, ReportLevel reportLevel, Map<FqName, ? extends ReportLevel> userDefinedLevelForSpecificAnnotation) {
|
||||
Intrinsics.checkNotNullParameter(globalLevel, "globalLevel");
|
||||
Intrinsics.checkNotNullParameter(userDefinedLevelForSpecificAnnotation, "userDefinedLevelForSpecificAnnotation");
|
||||
this.globalLevel = globalLevel;
|
||||
this.migrationLevel = reportLevel;
|
||||
this.userDefinedLevelForSpecificAnnotation = userDefinedLevelForSpecificAnnotation;
|
||||
this.description$delegate = LazyKt.lazy(new Function0<String[]>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.Jsr305Settings$description$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final String[] invoke() {
|
||||
Jsr305Settings jsr305Settings = Jsr305Settings.this;
|
||||
List createListBuilder = CollectionsKt.createListBuilder();
|
||||
createListBuilder.add(jsr305Settings.getGlobalLevel().getDescription());
|
||||
ReportLevel migrationLevel = jsr305Settings.getMigrationLevel();
|
||||
if (migrationLevel != null) {
|
||||
createListBuilder.add("under-migration:" + migrationLevel.getDescription());
|
||||
}
|
||||
for (Map.Entry<FqName, ReportLevel> entry : jsr305Settings.getUserDefinedLevelForSpecificAnnotation().entrySet()) {
|
||||
createListBuilder.add("@" + entry.getKey() + ':' + entry.getValue().getDescription());
|
||||
}
|
||||
return (String[]) CollectionsKt.build(createListBuilder).toArray(new String[0]);
|
||||
}
|
||||
});
|
||||
ReportLevel reportLevel2 = ReportLevel.IGNORE;
|
||||
this.isDisabled = globalLevel == reportLevel2 && reportLevel == reportLevel2 && userDefinedLevelForSpecificAnnotation.isEmpty();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof Jsr305Settings)) {
|
||||
return false;
|
||||
}
|
||||
Jsr305Settings jsr305Settings = (Jsr305Settings) obj;
|
||||
return this.globalLevel == jsr305Settings.globalLevel && this.migrationLevel == jsr305Settings.migrationLevel && Intrinsics.areEqual(this.userDefinedLevelForSpecificAnnotation, jsr305Settings.userDefinedLevelForSpecificAnnotation);
|
||||
}
|
||||
|
||||
public final ReportLevel getGlobalLevel() {
|
||||
return this.globalLevel;
|
||||
}
|
||||
|
||||
public final ReportLevel getMigrationLevel() {
|
||||
return this.migrationLevel;
|
||||
}
|
||||
|
||||
public final Map<FqName, ReportLevel> getUserDefinedLevelForSpecificAnnotation() {
|
||||
return this.userDefinedLevelForSpecificAnnotation;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = this.globalLevel.hashCode() * 31;
|
||||
ReportLevel reportLevel = this.migrationLevel;
|
||||
return this.userDefinedLevelForSpecificAnnotation.hashCode() + ((hashCode + (reportLevel == null ? 0 : reportLevel.hashCode())) * 31);
|
||||
}
|
||||
|
||||
public final boolean isDisabled() {
|
||||
return this.isDisabled;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Jsr305Settings(globalLevel=" + this.globalLevel + ", migrationLevel=" + this.migrationLevel + ", userDefinedLevelForSpecificAnnotation=" + this.userDefinedLevelForSpecificAnnotation + ')';
|
||||
}
|
||||
|
||||
public /* synthetic */ Jsr305Settings(ReportLevel reportLevel, ReportLevel reportLevel2, Map map, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(reportLevel, (i & 2) != 0 ? null : reportLevel2, (i & 4) != 0 ? MapsKt.emptyMap() : map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.JvmField;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt;
|
||||
import kotlin.text.StringsKt__StringsJVMKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JvmAbi {
|
||||
public static final JvmAbi INSTANCE = new JvmAbi();
|
||||
|
||||
@JvmField
|
||||
public static final ClassId JVM_FIELD_ANNOTATION_CLASS_ID;
|
||||
|
||||
@JvmField
|
||||
public static final FqName JVM_FIELD_ANNOTATION_FQ_NAME;
|
||||
private static final ClassId REFLECTION_FACTORY_IMPL;
|
||||
private static final ClassId REPEATABLE_ANNOTATION_CONTAINER_META_ANNOTATION;
|
||||
|
||||
static {
|
||||
FqName fqName = new FqName("kotlin.jvm.JvmField");
|
||||
JVM_FIELD_ANNOTATION_FQ_NAME = fqName;
|
||||
ClassId classId = ClassId.topLevel(fqName);
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
JVM_FIELD_ANNOTATION_CLASS_ID = classId;
|
||||
ClassId classId2 = ClassId.topLevel(new FqName("kotlin.reflect.jvm.internal.ReflectionFactoryImpl"));
|
||||
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
|
||||
REFLECTION_FACTORY_IMPL = classId2;
|
||||
ClassId fromString = ClassId.fromString("kotlin/jvm/internal/RepeatableContainer");
|
||||
Intrinsics.checkNotNullExpressionValue(fromString, "fromString(...)");
|
||||
REPEATABLE_ANNOTATION_CONTAINER_META_ANNOTATION = fromString;
|
||||
}
|
||||
|
||||
private JvmAbi() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final String getterName(String propertyName) {
|
||||
Intrinsics.checkNotNullParameter(propertyName, "propertyName");
|
||||
if (startsWithIsPrefix(propertyName)) {
|
||||
return propertyName;
|
||||
}
|
||||
return "get" + CapitalizeDecapitalizeKt.capitalizeAsciiOnly(propertyName);
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final boolean isGetterName(String name) {
|
||||
boolean startsWith$default;
|
||||
boolean startsWith$default2;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(name, "get", false, 2, null);
|
||||
if (startsWith$default) {
|
||||
return true;
|
||||
}
|
||||
startsWith$default2 = StringsKt__StringsJVMKt.startsWith$default(name, "is", false, 2, null);
|
||||
return startsWith$default2;
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final boolean isSetterName(String name) {
|
||||
boolean startsWith$default;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(name, "set", false, 2, null);
|
||||
return startsWith$default;
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final String setterName(String propertyName) {
|
||||
String capitalizeAsciiOnly;
|
||||
Intrinsics.checkNotNullParameter(propertyName, "propertyName");
|
||||
StringBuilder sb = new StringBuilder("set");
|
||||
if (startsWithIsPrefix(propertyName)) {
|
||||
capitalizeAsciiOnly = propertyName.substring(2);
|
||||
Intrinsics.checkNotNullExpressionValue(capitalizeAsciiOnly, "substring(...)");
|
||||
} else {
|
||||
capitalizeAsciiOnly = CapitalizeDecapitalizeKt.capitalizeAsciiOnly(propertyName);
|
||||
}
|
||||
sb.append(capitalizeAsciiOnly);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final boolean startsWithIsPrefix(String name) {
|
||||
boolean startsWith$default;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(name, "is", false, 2, null);
|
||||
if (!startsWith$default || name.length() == 2) {
|
||||
return false;
|
||||
}
|
||||
char charAt = name.charAt(2);
|
||||
return Intrinsics.compare(97, (int) charAt) > 0 || Intrinsics.compare((int) charAt, 122) > 0;
|
||||
}
|
||||
|
||||
public final ClassId getREPEATABLE_ANNOTATION_CONTAINER_META_ANNOTATION() {
|
||||
return REPEATABLE_ANNOTATION_CONTAINER_META_ANNOTATION;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmClassName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JvmAnnotationNames {
|
||||
public static final Name DEFAULT_ANNOTATION_MEMBER_NAME;
|
||||
public static final FqName DEPRECATED_ANNOTATION;
|
||||
public static final FqName DOCUMENTED_ANNOTATION;
|
||||
public static final FqName ELEMENT_TYPE_ENUM;
|
||||
public static final FqName ENHANCED_MUTABILITY_ANNOTATION;
|
||||
public static final FqName ENHANCED_NULLABILITY_ANNOTATION;
|
||||
public static final FqName JETBRAINS_MUTABLE_ANNOTATION;
|
||||
public static final FqName JETBRAINS_NOT_NULL_ANNOTATION;
|
||||
public static final FqName JETBRAINS_NULLABLE_ANNOTATION;
|
||||
public static final FqName JETBRAINS_READONLY_ANNOTATION;
|
||||
public static final FqName KOTLIN_JVM_INTERNAL;
|
||||
public static final String METADATA_DESC;
|
||||
public static final FqName METADATA_FQ_NAME;
|
||||
public static final FqName MUTABLE_ANNOTATION;
|
||||
public static final FqName OVERRIDE_ANNOTATION;
|
||||
public static final FqName PURELY_IMPLEMENTS_ANNOTATION;
|
||||
public static final FqName READONLY_ANNOTATION;
|
||||
public static final FqName REPEATABLE_ANNOTATION;
|
||||
public static final FqName RETENTION_ANNOTATION;
|
||||
public static final FqName RETENTION_POLICY_ENUM;
|
||||
public static final String SERIALIZED_IR_DESC;
|
||||
public static final FqName SERIALIZED_IR_FQ_NAME;
|
||||
public static final FqName TARGET_ANNOTATION;
|
||||
|
||||
static {
|
||||
FqName fqName = new FqName("kotlin.Metadata");
|
||||
METADATA_FQ_NAME = fqName;
|
||||
METADATA_DESC = "L" + JvmClassName.byFqNameWithoutInnerClasses(fqName).getInternalName() + ";";
|
||||
DEFAULT_ANNOTATION_MEMBER_NAME = Name.identifier("value");
|
||||
TARGET_ANNOTATION = new FqName(Target.class.getName());
|
||||
ELEMENT_TYPE_ENUM = new FqName(ElementType.class.getName());
|
||||
RETENTION_ANNOTATION = new FqName(Retention.class.getName());
|
||||
RETENTION_POLICY_ENUM = new FqName(RetentionPolicy.class.getName());
|
||||
DEPRECATED_ANNOTATION = new FqName(Deprecated.class.getName());
|
||||
DOCUMENTED_ANNOTATION = new FqName(Documented.class.getName());
|
||||
REPEATABLE_ANNOTATION = new FqName("java.lang.annotation.Repeatable");
|
||||
OVERRIDE_ANNOTATION = new FqName(Override.class.getName());
|
||||
JETBRAINS_NOT_NULL_ANNOTATION = new FqName("org.jetbrains.annotations.NotNull");
|
||||
JETBRAINS_NULLABLE_ANNOTATION = new FqName("org.jetbrains.annotations.Nullable");
|
||||
JETBRAINS_MUTABLE_ANNOTATION = new FqName("org.jetbrains.annotations.Mutable");
|
||||
JETBRAINS_READONLY_ANNOTATION = new FqName("org.jetbrains.annotations.ReadOnly");
|
||||
READONLY_ANNOTATION = new FqName("kotlin.annotations.jvm.ReadOnly");
|
||||
MUTABLE_ANNOTATION = new FqName("kotlin.annotations.jvm.Mutable");
|
||||
PURELY_IMPLEMENTS_ANNOTATION = new FqName("kotlin.jvm.PurelyImplements");
|
||||
KOTLIN_JVM_INTERNAL = new FqName("kotlin.jvm.internal");
|
||||
FqName fqName2 = new FqName("kotlin.jvm.internal.SerializedIr");
|
||||
SERIALIZED_IR_FQ_NAME = fqName2;
|
||||
SERIALIZED_IR_DESC = "L" + JvmClassName.byFqNameWithoutInnerClasses(fqName2).getInternalName() + ";";
|
||||
ENHANCED_NULLABILITY_ANNOTATION = new FqName("kotlin.jvm.internal.EnhancedNullability");
|
||||
ENHANCED_MUTABILITY_ANNOTATION = new FqName("kotlin.jvm.internal.EnhancedMutability");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JvmAnnotationNamesKt {
|
||||
private static final FqName ANDROIDX_RECENTLY_NON_NULL_ANNOTATION;
|
||||
private static final FqName ANDROIDX_RECENTLY_NULLABLE_ANNOTATION;
|
||||
private static final FqName COMPATQUAL_NONNULL_ANNOTATION;
|
||||
private static final FqName COMPATQUAL_NULLABLE_ANNOTATION;
|
||||
private static final FqName JAVAX_CHECKFORNULL_ANNOTATION;
|
||||
private static final FqName JAVAX_NONNULL_ANNOTATION;
|
||||
private static final FqName JSPECIFY_NULLABLE;
|
||||
private static final FqName JSPECIFY_NULLNESS_UNKNOWN;
|
||||
private static final FqName JSPECIFY_NULL_MARKED;
|
||||
private static final FqName JSPECIFY_OLD_NULLABLE;
|
||||
private static final FqName JSPECIFY_OLD_NULLNESS_UNKNOWN;
|
||||
private static final FqName JSPECIFY_OLD_NULL_MARKED;
|
||||
private static final Set<FqName> MUTABLE_ANNOTATIONS;
|
||||
private static final List<FqName> NOT_NULL_ANNOTATIONS;
|
||||
private static final Set<FqName> NULLABILITY_ANNOTATIONS;
|
||||
private static final List<FqName> NULLABLE_ANNOTATIONS;
|
||||
private static final Set<FqName> READ_ONLY_ANNOTATIONS;
|
||||
private static final Map<FqName, FqName> javaToKotlinNameMap;
|
||||
|
||||
static {
|
||||
FqName fqName = new FqName("org.jspecify.nullness.Nullable");
|
||||
JSPECIFY_OLD_NULLABLE = fqName;
|
||||
JSPECIFY_OLD_NULLNESS_UNKNOWN = new FqName("org.jspecify.nullness.NullnessUnspecified");
|
||||
FqName fqName2 = new FqName("org.jspecify.nullness.NullMarked");
|
||||
JSPECIFY_OLD_NULL_MARKED = fqName2;
|
||||
FqName fqName3 = new FqName("org.jspecify.annotations.Nullable");
|
||||
JSPECIFY_NULLABLE = fqName3;
|
||||
JSPECIFY_NULLNESS_UNKNOWN = new FqName("org.jspecify.annotations.NullnessUnspecified");
|
||||
FqName fqName4 = new FqName("org.jspecify.annotations.NullMarked");
|
||||
JSPECIFY_NULL_MARKED = fqName4;
|
||||
List<FqName> listOf = CollectionsKt.listOf((Object[]) new FqName[]{JvmAnnotationNames.JETBRAINS_NULLABLE_ANNOTATION, new FqName("androidx.annotation.Nullable"), new FqName("androidx.annotation.Nullable"), new FqName("android.annotation.Nullable"), new FqName("com.android.annotations.Nullable"), new FqName("org.eclipse.jdt.annotation.Nullable"), new FqName("org.checkerframework.checker.nullness.qual.Nullable"), new FqName("javax.annotation.Nullable"), new FqName("javax.annotation.CheckForNull"), new FqName("edu.umd.cs.findbugs.annotations.CheckForNull"), new FqName("edu.umd.cs.findbugs.annotations.Nullable"), new FqName("edu.umd.cs.findbugs.annotations.PossiblyNull"), new FqName("io.reactivex.annotations.Nullable"), new FqName("io.reactivex.rxjava3.annotations.Nullable")});
|
||||
NULLABLE_ANNOTATIONS = listOf;
|
||||
FqName fqName5 = new FqName("javax.annotation.Nonnull");
|
||||
JAVAX_NONNULL_ANNOTATION = fqName5;
|
||||
JAVAX_CHECKFORNULL_ANNOTATION = new FqName("javax.annotation.CheckForNull");
|
||||
List<FqName> listOf2 = CollectionsKt.listOf((Object[]) new FqName[]{JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION, new FqName("edu.umd.cs.findbugs.annotations.NonNull"), new FqName("androidx.annotation.NonNull"), new FqName("androidx.annotation.NonNull"), new FqName("android.annotation.NonNull"), new FqName("com.android.annotations.NonNull"), new FqName("org.eclipse.jdt.annotation.NonNull"), new FqName("org.checkerframework.checker.nullness.qual.NonNull"), new FqName("lombok.NonNull"), new FqName("io.reactivex.annotations.NonNull"), new FqName("io.reactivex.rxjava3.annotations.NonNull")});
|
||||
NOT_NULL_ANNOTATIONS = listOf2;
|
||||
FqName fqName6 = new FqName("org.checkerframework.checker.nullness.compatqual.NullableDecl");
|
||||
COMPATQUAL_NULLABLE_ANNOTATION = fqName6;
|
||||
FqName fqName7 = new FqName("org.checkerframework.checker.nullness.compatqual.NonNullDecl");
|
||||
COMPATQUAL_NONNULL_ANNOTATION = fqName7;
|
||||
FqName fqName8 = new FqName("androidx.annotation.RecentlyNullable");
|
||||
ANDROIDX_RECENTLY_NULLABLE_ANNOTATION = fqName8;
|
||||
FqName fqName9 = new FqName("androidx.annotation.RecentlyNonNull");
|
||||
ANDROIDX_RECENTLY_NON_NULL_ANNOTATION = fqName9;
|
||||
NULLABILITY_ANNOTATIONS = SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set<? extends FqName>) SetsKt.plus(SetsKt.plus((Set<? extends FqName>) SetsKt.plus((Set) new LinkedHashSet(), (Iterable) listOf), fqName5), (Iterable) listOf2), fqName6), fqName7), fqName8), fqName9), fqName), fqName2), fqName3), fqName4);
|
||||
READ_ONLY_ANNOTATIONS = SetsKt.setOf((Object[]) new FqName[]{JvmAnnotationNames.JETBRAINS_READONLY_ANNOTATION, JvmAnnotationNames.READONLY_ANNOTATION});
|
||||
MUTABLE_ANNOTATIONS = SetsKt.setOf((Object[]) new FqName[]{JvmAnnotationNames.JETBRAINS_MUTABLE_ANNOTATION, JvmAnnotationNames.MUTABLE_ANNOTATION});
|
||||
javaToKotlinNameMap = MapsKt.mapOf(TuplesKt.to(JvmAnnotationNames.TARGET_ANNOTATION, StandardNames.FqNames.target), TuplesKt.to(JvmAnnotationNames.RETENTION_ANNOTATION, StandardNames.FqNames.retention), TuplesKt.to(JvmAnnotationNames.DEPRECATED_ANNOTATION, StandardNames.FqNames.deprecated), TuplesKt.to(JvmAnnotationNames.DOCUMENTED_ANNOTATION, StandardNames.FqNames.mustBeDocumented));
|
||||
}
|
||||
|
||||
public static final FqName getANDROIDX_RECENTLY_NON_NULL_ANNOTATION() {
|
||||
return ANDROIDX_RECENTLY_NON_NULL_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getANDROIDX_RECENTLY_NULLABLE_ANNOTATION() {
|
||||
return ANDROIDX_RECENTLY_NULLABLE_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getCOMPATQUAL_NONNULL_ANNOTATION() {
|
||||
return COMPATQUAL_NONNULL_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getCOMPATQUAL_NULLABLE_ANNOTATION() {
|
||||
return COMPATQUAL_NULLABLE_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getJAVAX_CHECKFORNULL_ANNOTATION() {
|
||||
return JAVAX_CHECKFORNULL_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getJAVAX_NONNULL_ANNOTATION() {
|
||||
return JAVAX_NONNULL_ANNOTATION;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_NULLABLE() {
|
||||
return JSPECIFY_NULLABLE;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_NULLNESS_UNKNOWN() {
|
||||
return JSPECIFY_NULLNESS_UNKNOWN;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_NULL_MARKED() {
|
||||
return JSPECIFY_NULL_MARKED;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_OLD_NULLABLE() {
|
||||
return JSPECIFY_OLD_NULLABLE;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_OLD_NULLNESS_UNKNOWN() {
|
||||
return JSPECIFY_OLD_NULLNESS_UNKNOWN;
|
||||
}
|
||||
|
||||
public static final FqName getJSPECIFY_OLD_NULL_MARKED() {
|
||||
return JSPECIFY_OLD_NULL_MARKED;
|
||||
}
|
||||
|
||||
public static final Set<FqName> getMUTABLE_ANNOTATIONS() {
|
||||
return MUTABLE_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final List<FqName> getNOT_NULL_ANNOTATIONS() {
|
||||
return NOT_NULL_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final List<FqName> getNULLABLE_ANNOTATIONS() {
|
||||
return NULLABLE_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public static final Set<FqName> getREAD_ONLY_ANNOTATIONS() {
|
||||
return READ_ONLY_ANNOTATIONS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface NullabilityAnnotationStates<T> {
|
||||
public static final Companion Companion = Companion.$$INSTANCE;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
static final /* synthetic */ Companion $$INSTANCE = new Companion();
|
||||
private static final NullabilityAnnotationStates EMPTY = new NullabilityAnnotationStatesImpl(MapsKt.emptyMap());
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
|
||||
public final NullabilityAnnotationStates getEMPTY() {
|
||||
return EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
T get(FqName fqName);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqNamesUtilKt;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNullable;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class NullabilityAnnotationStatesImpl<T> implements NullabilityAnnotationStates<T> {
|
||||
private final MemoizedFunctionToNullable<FqName, T> cache;
|
||||
private final Map<FqName, T> states;
|
||||
private final LockBasedStorageManager storageManager;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public NullabilityAnnotationStatesImpl(Map<FqName, ? extends T> states) {
|
||||
Intrinsics.checkNotNullParameter(states, "states");
|
||||
this.states = states;
|
||||
LockBasedStorageManager lockBasedStorageManager = new LockBasedStorageManager("Java nullability annotation states");
|
||||
this.storageManager = lockBasedStorageManager;
|
||||
MemoizedFunctionToNullable<FqName, T> createMemoizedFunctionWithNullableValues = lockBasedStorageManager.createMemoizedFunctionWithNullableValues(new Function1<FqName, T>(this) { // from class: kotlin.reflect.jvm.internal.impl.load.java.NullabilityAnnotationStatesImpl$cache$1
|
||||
final /* synthetic */ NullabilityAnnotationStatesImpl<T> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(1);
|
||||
this.this$0 = this;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final T invoke(FqName fqName) {
|
||||
Intrinsics.checkNotNull(fqName);
|
||||
return (T) FqNamesUtilKt.findValueForMostSpecificFqname(fqName, this.this$0.getStates());
|
||||
}
|
||||
});
|
||||
Intrinsics.checkNotNullExpressionValue(createMemoizedFunctionWithNullableValues, "createMemoizedFunctionWithNullableValues(...)");
|
||||
this.cache = createMemoizedFunctionWithNullableValues;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.NullabilityAnnotationStates
|
||||
public T get(FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
return this.cache.invoke(fqName);
|
||||
}
|
||||
|
||||
public final Map<FqName, T> getStates() {
|
||||
return this.states;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt;
|
||||
import kotlin.text.StringsKt__StringsJVMKt;
|
||||
import kotlin.text.StringsKt__StringsKt;
|
||||
import u.AbstractC0629f;
|
||||
|
||||
@SourceDebugExtension({"SMAP\npropertiesConventionUtil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 propertiesConventionUtil.kt\norg/jetbrains/kotlin/load/java/PropertiesConventionUtilKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,102:1\n766#2:103\n857#2,2:104\n*S KotlinDebug\n*F\n+ 1 propertiesConventionUtil.kt\norg/jetbrains/kotlin/load/java/PropertiesConventionUtilKt\n*L\n90#1:103\n90#1:104,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PropertiesConventionUtilKt {
|
||||
public static final List<Name> getPropertyNamesCandidatesByAccessorName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
String asString = name.asString();
|
||||
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
|
||||
return JvmAbi.isGetterName(asString) ? CollectionsKt.listOfNotNull(propertyNameByGetMethodName(name)) : JvmAbi.isSetterName(asString) ? propertyNamesBySetMethodName(name) : BuiltinSpecialProperties.INSTANCE.getPropertyNameCandidatesBySpecialGetterName(name);
|
||||
}
|
||||
|
||||
public static final Name propertyNameByGetMethodName(Name methodName) {
|
||||
Intrinsics.checkNotNullParameter(methodName, "methodName");
|
||||
Name propertyNameFromAccessorMethodName$default = propertyNameFromAccessorMethodName$default(methodName, "get", false, null, 12, null);
|
||||
return propertyNameFromAccessorMethodName$default == null ? propertyNameFromAccessorMethodName$default(methodName, "is", false, null, 8, null) : propertyNameFromAccessorMethodName$default;
|
||||
}
|
||||
|
||||
public static final Name propertyNameBySetMethodName(Name methodName, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(methodName, "methodName");
|
||||
return propertyNameFromAccessorMethodName$default(methodName, "set", false, z3 ? "is" : null, 4, null);
|
||||
}
|
||||
|
||||
private static final Name propertyNameFromAccessorMethodName(Name name, String str, boolean z3, String str2) {
|
||||
boolean startsWith$default;
|
||||
String removePrefix;
|
||||
String removePrefix2;
|
||||
if (name.isSpecial()) {
|
||||
return null;
|
||||
}
|
||||
String identifier = name.getIdentifier();
|
||||
Intrinsics.checkNotNullExpressionValue(identifier, "getIdentifier(...)");
|
||||
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(identifier, str, false, 2, null);
|
||||
if (!startsWith$default || identifier.length() == str.length()) {
|
||||
return null;
|
||||
}
|
||||
char charAt = identifier.charAt(str.length());
|
||||
if ('a' <= charAt && charAt < '{') {
|
||||
return null;
|
||||
}
|
||||
if (str2 != null) {
|
||||
StringBuilder a2 = AbstractC0629f.a(str2);
|
||||
removePrefix2 = StringsKt__StringsKt.removePrefix(identifier, (CharSequence) str);
|
||||
a2.append(removePrefix2);
|
||||
return Name.identifier(a2.toString());
|
||||
}
|
||||
if (!z3) {
|
||||
return name;
|
||||
}
|
||||
removePrefix = StringsKt__StringsKt.removePrefix(identifier, (CharSequence) str);
|
||||
String decapitalizeSmartForCompiler = CapitalizeDecapitalizeKt.decapitalizeSmartForCompiler(removePrefix, true);
|
||||
if (Name.isValidIdentifier(decapitalizeSmartForCompiler)) {
|
||||
return Name.identifier(decapitalizeSmartForCompiler);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* synthetic */ Name propertyNameFromAccessorMethodName$default(Name name, String str, boolean z3, String str2, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
z3 = true;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
str2 = null;
|
||||
}
|
||||
return propertyNameFromAccessorMethodName(name, str, z3, str2);
|
||||
}
|
||||
|
||||
public static final List<Name> propertyNamesBySetMethodName(Name methodName) {
|
||||
Intrinsics.checkNotNullParameter(methodName, "methodName");
|
||||
return CollectionsKt.listOfNotNull((Object[]) new Name[]{propertyNameBySetMethodName(methodName, false), propertyNameBySetMethodName(methodName, true)});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ReportLevel {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ ReportLevel[] $VALUES;
|
||||
public static final Companion Companion;
|
||||
private final String description;
|
||||
public static final ReportLevel IGNORE = new ReportLevel("IGNORE", 0, "ignore");
|
||||
public static final ReportLevel WARN = new ReportLevel("WARN", 1, "warn");
|
||||
public static final ReportLevel STRICT = new ReportLevel("STRICT", 2, "strict");
|
||||
|
||||
@SourceDebugExtension({"SMAP\nReportLevel.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ReportLevel.kt\norg/jetbrains/kotlin/load/java/ReportLevel$Companion\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,20:1\n1282#2,2:21\n*S KotlinDebug\n*F\n+ 1 ReportLevel.kt\norg/jetbrains/kotlin/load/java/ReportLevel$Companion\n*L\n15#1:21,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
private static final /* synthetic */ ReportLevel[] $values() {
|
||||
return new ReportLevel[]{IGNORE, WARN, STRICT};
|
||||
}
|
||||
|
||||
static {
|
||||
ReportLevel[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
Companion = new Companion(null);
|
||||
}
|
||||
|
||||
private ReportLevel(String str, int i, String str2) {
|
||||
this.description = str2;
|
||||
}
|
||||
|
||||
public static ReportLevel valueOf(String str) {
|
||||
return (ReportLevel) Enum.valueOf(ReportLevel.class, str);
|
||||
}
|
||||
|
||||
public static ReportLevel[] values() {
|
||||
return (ReportLevel[]) $VALUES.clone();
|
||||
}
|
||||
|
||||
public final String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public final boolean isIgnore() {
|
||||
return this == IGNORE;
|
||||
}
|
||||
|
||||
public final boolean isWarning() {
|
||||
return this == WARN;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import kotlin.jvm.JvmName;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyAccessorDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.TypeCheckingProcedure;
|
||||
|
||||
@JvmName(name = "SpecialBuiltinMembers")
|
||||
@SourceDebugExtension({"SMAP\nspecialBuiltinMembers.kt\nKotlin\n*S Kotlin\n*F\n+ 1 specialBuiltinMembers.kt\norg/jetbrains/kotlin/load/java/SpecialBuiltinMembers\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,182:1\n1#2:183\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SpecialBuiltinMembers {
|
||||
public static final boolean doesOverrideBuiltinWithDifferentJvmName(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
|
||||
return getOverriddenBuiltinWithDifferentJvmName(callableMemberDescriptor) != null;
|
||||
}
|
||||
|
||||
public static final String getJvmMethodNameIfSpecial(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
CallableMemberDescriptor propertyIfAccessor;
|
||||
Name jvmName;
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "callableMemberDescriptor");
|
||||
CallableMemberDescriptor overriddenBuiltinThatAffectsJvmName = getOverriddenBuiltinThatAffectsJvmName(callableMemberDescriptor);
|
||||
if (overriddenBuiltinThatAffectsJvmName != null && (propertyIfAccessor = DescriptorUtilsKt.getPropertyIfAccessor(overriddenBuiltinThatAffectsJvmName)) != null) {
|
||||
if (propertyIfAccessor instanceof PropertyDescriptor) {
|
||||
return ClassicBuiltinSpecialProperties.INSTANCE.getBuiltinSpecialPropertyGetterName(propertyIfAccessor);
|
||||
}
|
||||
if ((propertyIfAccessor instanceof SimpleFunctionDescriptor) && (jvmName = BuiltinMethodsWithDifferentJvmName.INSTANCE.getJvmName((SimpleFunctionDescriptor) propertyIfAccessor)) != null) {
|
||||
return jvmName.asString();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final CallableMemberDescriptor getOverriddenBuiltinThatAffectsJvmName(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
if (KotlinBuiltIns.isBuiltIn(callableMemberDescriptor)) {
|
||||
return getOverriddenBuiltinWithDifferentJvmName(callableMemberDescriptor);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final <T extends CallableMemberDescriptor> T getOverriddenBuiltinWithDifferentJvmName(T t2) {
|
||||
Intrinsics.checkNotNullParameter(t2, "<this>");
|
||||
if (!SpecialGenericSignatures.Companion.getORIGINAL_SHORT_NAMES().contains(t2.getName()) && !BuiltinSpecialProperties.INSTANCE.getSPECIAL_SHORT_NAMES().contains(DescriptorUtilsKt.getPropertyIfAccessor(t2).getName())) {
|
||||
return null;
|
||||
}
|
||||
if (t2 instanceof PropertyDescriptor ? true : t2 instanceof PropertyAccessorDescriptor) {
|
||||
return (T) DescriptorUtilsKt.firstOverridden$default(t2, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.SpecialBuiltinMembers$getOverriddenBuiltinWithDifferentJvmName$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(ClassicBuiltinSpecialProperties.INSTANCE.hasBuiltinSpecialPropertyFqName(DescriptorUtilsKt.getPropertyIfAccessor(it)));
|
||||
}
|
||||
}, 1, null);
|
||||
}
|
||||
if (t2 instanceof SimpleFunctionDescriptor) {
|
||||
return (T) DescriptorUtilsKt.firstOverridden$default(t2, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.SpecialBuiltinMembers$getOverriddenBuiltinWithDifferentJvmName$2
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(BuiltinMethodsWithDifferentJvmName.INSTANCE.isBuiltinFunctionWithDifferentNameInJvm((SimpleFunctionDescriptor) it));
|
||||
}
|
||||
}, 1, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final <T extends CallableMemberDescriptor> T getOverriddenSpecialBuiltin(T t2) {
|
||||
Intrinsics.checkNotNullParameter(t2, "<this>");
|
||||
T t4 = (T) getOverriddenBuiltinWithDifferentJvmName(t2);
|
||||
if (t4 != null) {
|
||||
return t4;
|
||||
}
|
||||
BuiltinMethodsWithSpecialGenericSignature builtinMethodsWithSpecialGenericSignature = BuiltinMethodsWithSpecialGenericSignature.INSTANCE;
|
||||
Name name = t2.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
if (builtinMethodsWithSpecialGenericSignature.getSameAsBuiltinMethodWithErasedValueParameters(name)) {
|
||||
return (T) DescriptorUtilsKt.firstOverridden$default(t2, false, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.SpecialBuiltinMembers$getOverriddenSpecialBuiltin$2
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(CallableMemberDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(KotlinBuiltIns.isBuiltIn(it) && BuiltinMethodsWithSpecialGenericSignature.getSpecialSignatureInfo(it) != null);
|
||||
}
|
||||
}, 1, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final boolean hasRealKotlinSuperClassWithOverrideOf(ClassDescriptor classDescriptor, CallableDescriptor specialCallableDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(classDescriptor, "<this>");
|
||||
Intrinsics.checkNotNullParameter(specialCallableDescriptor, "specialCallableDescriptor");
|
||||
DeclarationDescriptor containingDeclaration = specialCallableDescriptor.getContainingDeclaration();
|
||||
Intrinsics.checkNotNull(containingDeclaration, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
|
||||
SimpleType defaultType = ((ClassDescriptor) containingDeclaration).getDefaultType();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
|
||||
for (ClassDescriptor superClassDescriptor = DescriptorUtils.getSuperClassDescriptor(classDescriptor); superClassDescriptor != null; superClassDescriptor = DescriptorUtils.getSuperClassDescriptor(superClassDescriptor)) {
|
||||
if (!(superClassDescriptor instanceof JavaClassDescriptor) && TypeCheckingProcedure.findCorrespondingSupertype(superClassDescriptor.getDefaultType(), defaultType) != null) {
|
||||
return !KotlinBuiltIns.isBuiltIn(superClassDescriptor);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final boolean isFromJava(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
|
||||
return DescriptorUtilsKt.getPropertyIfAccessor(callableMemberDescriptor).getContainingDeclaration() instanceof JavaClassDescriptor;
|
||||
}
|
||||
|
||||
public static final boolean isFromJavaOrBuiltins(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(callableMemberDescriptor, "<this>");
|
||||
return isFromJava(callableMemberDescriptor) || KotlinBuiltIns.isBuiltIn(callableMemberDescriptor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,463 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.collections.MapsKt__MapsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.ranges.RangesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.SignatureBuildingComponents;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmPrimitiveType;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nSpecialGenericSignatures.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SpecialGenericSignatures.kt\norg/jetbrains/kotlin/load/java/SpecialGenericSignatures\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 SignatureBuildingComponents.kt\norg/jetbrains/kotlin/load/kotlin/SignatureBuildingComponentsKt\n+ 4 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 5 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,155:1\n1549#2:156\n1620#2,3:157\n1549#2:160\n1620#2,3:161\n1549#2:164\n1620#2,3:165\n1238#2,4:171\n1549#2:175\n1620#2,3:176\n1549#2:179\n1620#2,3:180\n1238#2,4:186\n1549#2:193\n1620#2,3:194\n1549#2:197\n1620#2,3:198\n1208#2,2:201\n1238#2,4:203\n13#3:168\n13#3:183\n468#4:169\n414#4:170\n468#4:184\n414#4:185\n152#5,3:190\n*S KotlinDebug\n*F\n+ 1 SpecialGenericSignatures.kt\norg/jetbrains/kotlin/load/java/SpecialGenericSignatures\n*L\n57#1:156\n57#1:157,3\n59#1:160\n59#1:161,3\n60#1:164\n60#1:165,3\n98#1:171,4\n104#1:175\n104#1:176,3\n105#1:179\n105#1:180,3\n129#1:186,4\n137#1:193\n137#1:194,3\n141#1:197\n141#1:198,3\n142#1:201,2\n142#1:203,4\n63#1:168\n114#1:183\n98#1:169\n98#1:170\n129#1:184\n129#1:185\n133#1:190,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class SpecialGenericSignatures {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final List<String> ERASED_COLLECTION_PARAMETER_NAMES;
|
||||
private static final List<Companion.NameAndSignature> ERASED_COLLECTION_PARAMETER_NAME_AND_SIGNATURES;
|
||||
private static final List<String> ERASED_COLLECTION_PARAMETER_SIGNATURES;
|
||||
private static final Set<Name> ERASED_VALUE_PARAMETERS_SHORT_NAMES;
|
||||
private static final Set<String> ERASED_VALUE_PARAMETERS_SIGNATURES;
|
||||
private static final Map<Companion.NameAndSignature, TypeSafeBarrierDescription> GENERIC_PARAMETERS_METHODS_TO_DEFAULT_VALUES_MAP;
|
||||
private static final Map<Name, Name> JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP;
|
||||
private static final Set<String> JVM_SIGNATURES_FOR_RENAMED_BUILT_INS;
|
||||
private static final Map<Companion.NameAndSignature, Name> NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP;
|
||||
private static final List<Name> ORIGINAL_SHORT_NAMES;
|
||||
private static final Companion.NameAndSignature REMOVE_AT_NAME_AND_SIGNATURE;
|
||||
private static final Map<String, TypeSafeBarrierDescription> SIGNATURE_TO_DEFAULT_VALUES_MAP;
|
||||
private static final Map<String, Name> SIGNATURE_TO_JVM_REPRESENTATION_NAME;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class NameAndSignature {
|
||||
private final String classInternalName;
|
||||
private final Name name;
|
||||
private final String parameters;
|
||||
private final String returnType;
|
||||
private final String signature;
|
||||
|
||||
public NameAndSignature(String classInternalName, Name name, String parameters, String returnType) {
|
||||
Intrinsics.checkNotNullParameter(classInternalName, "classInternalName");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(parameters, "parameters");
|
||||
Intrinsics.checkNotNullParameter(returnType, "returnType");
|
||||
this.classInternalName = classInternalName;
|
||||
this.name = name;
|
||||
this.parameters = parameters;
|
||||
this.returnType = returnType;
|
||||
this.signature = SignatureBuildingComponents.INSTANCE.signature(classInternalName, name + '(' + parameters + ')' + returnType);
|
||||
}
|
||||
|
||||
public static /* synthetic */ NameAndSignature copy$default(NameAndSignature nameAndSignature, String str, Name name, String str2, String str3, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
str = nameAndSignature.classInternalName;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
name = nameAndSignature.name;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
str2 = nameAndSignature.parameters;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
str3 = nameAndSignature.returnType;
|
||||
}
|
||||
return nameAndSignature.copy(str, name, str2, str3);
|
||||
}
|
||||
|
||||
public final NameAndSignature copy(String classInternalName, Name name, String parameters, String returnType) {
|
||||
Intrinsics.checkNotNullParameter(classInternalName, "classInternalName");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(parameters, "parameters");
|
||||
Intrinsics.checkNotNullParameter(returnType, "returnType");
|
||||
return new NameAndSignature(classInternalName, name, parameters, returnType);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof NameAndSignature)) {
|
||||
return false;
|
||||
}
|
||||
NameAndSignature nameAndSignature = (NameAndSignature) obj;
|
||||
return Intrinsics.areEqual(this.classInternalName, nameAndSignature.classInternalName) && Intrinsics.areEqual(this.name, nameAndSignature.name) && Intrinsics.areEqual(this.parameters, nameAndSignature.parameters) && Intrinsics.areEqual(this.returnType, nameAndSignature.returnType);
|
||||
}
|
||||
|
||||
public final Name getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public final String getSignature() {
|
||||
return this.signature;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.returnType.hashCode() + a.d(this.parameters, (this.name.hashCode() + (this.classInternalName.hashCode() * 31)) * 31, 31);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("NameAndSignature(classInternalName=");
|
||||
sb.append(this.classInternalName);
|
||||
sb.append(", name=");
|
||||
sb.append(this.name);
|
||||
sb.append(", parameters=");
|
||||
sb.append(this.parameters);
|
||||
sb.append(", returnType=");
|
||||
return a.n(sb, this.returnType, ')');
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final NameAndSignature method(String str, String str2, String str3, String str4) {
|
||||
Name identifier = Name.identifier(str2);
|
||||
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
|
||||
return new NameAndSignature(str, identifier, str3, str4);
|
||||
}
|
||||
|
||||
public final Name getBuiltinFunctionNamesByJvmName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return getJVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP().get(name);
|
||||
}
|
||||
|
||||
public final List<String> getERASED_COLLECTION_PARAMETER_SIGNATURES() {
|
||||
return SpecialGenericSignatures.ERASED_COLLECTION_PARAMETER_SIGNATURES;
|
||||
}
|
||||
|
||||
public final Set<Name> getERASED_VALUE_PARAMETERS_SHORT_NAMES() {
|
||||
return SpecialGenericSignatures.ERASED_VALUE_PARAMETERS_SHORT_NAMES;
|
||||
}
|
||||
|
||||
public final Set<String> getERASED_VALUE_PARAMETERS_SIGNATURES() {
|
||||
return SpecialGenericSignatures.ERASED_VALUE_PARAMETERS_SIGNATURES;
|
||||
}
|
||||
|
||||
public final Map<Name, Name> getJVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP() {
|
||||
return SpecialGenericSignatures.JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP;
|
||||
}
|
||||
|
||||
public final List<Name> getORIGINAL_SHORT_NAMES() {
|
||||
return SpecialGenericSignatures.ORIGINAL_SHORT_NAMES;
|
||||
}
|
||||
|
||||
public final NameAndSignature getREMOVE_AT_NAME_AND_SIGNATURE() {
|
||||
return SpecialGenericSignatures.REMOVE_AT_NAME_AND_SIGNATURE;
|
||||
}
|
||||
|
||||
public final Map<String, TypeSafeBarrierDescription> getSIGNATURE_TO_DEFAULT_VALUES_MAP() {
|
||||
return SpecialGenericSignatures.SIGNATURE_TO_DEFAULT_VALUES_MAP;
|
||||
}
|
||||
|
||||
public final Map<String, Name> getSIGNATURE_TO_JVM_REPRESENTATION_NAME() {
|
||||
return SpecialGenericSignatures.SIGNATURE_TO_JVM_REPRESENTATION_NAME;
|
||||
}
|
||||
|
||||
public final boolean getSameAsRenamedInJvmBuiltin(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "<this>");
|
||||
return getORIGINAL_SHORT_NAMES().contains(name);
|
||||
}
|
||||
|
||||
public final SpecialSignatureInfo getSpecialSignatureInfo(String builtinSignature) {
|
||||
Object value;
|
||||
Intrinsics.checkNotNullParameter(builtinSignature, "builtinSignature");
|
||||
if (getERASED_COLLECTION_PARAMETER_SIGNATURES().contains(builtinSignature)) {
|
||||
return SpecialSignatureInfo.ONE_COLLECTION_PARAMETER;
|
||||
}
|
||||
value = MapsKt__MapsKt.getValue(getSIGNATURE_TO_DEFAULT_VALUES_MAP(), builtinSignature);
|
||||
return ((TypeSafeBarrierDescription) value) == TypeSafeBarrierDescription.NULL ? SpecialSignatureInfo.OBJECT_PARAMETER_GENERIC : SpecialSignatureInfo.OBJECT_PARAMETER_NON_GENERIC;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class SpecialSignatureInfo {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ SpecialSignatureInfo[] $VALUES;
|
||||
private final boolean isObjectReplacedWithTypeParameter;
|
||||
private final String valueParametersSignature;
|
||||
public static final SpecialSignatureInfo ONE_COLLECTION_PARAMETER = new SpecialSignatureInfo("ONE_COLLECTION_PARAMETER", 0, "Ljava/util/Collection<+Ljava/lang/Object;>;", false);
|
||||
public static final SpecialSignatureInfo OBJECT_PARAMETER_NON_GENERIC = new SpecialSignatureInfo("OBJECT_PARAMETER_NON_GENERIC", 1, null, true);
|
||||
public static final SpecialSignatureInfo OBJECT_PARAMETER_GENERIC = new SpecialSignatureInfo("OBJECT_PARAMETER_GENERIC", 2, "Ljava/lang/Object;", true);
|
||||
|
||||
private static final /* synthetic */ SpecialSignatureInfo[] $values() {
|
||||
return new SpecialSignatureInfo[]{ONE_COLLECTION_PARAMETER, OBJECT_PARAMETER_NON_GENERIC, OBJECT_PARAMETER_GENERIC};
|
||||
}
|
||||
|
||||
static {
|
||||
SpecialSignatureInfo[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private SpecialSignatureInfo(String str, int i, String str2, boolean z3) {
|
||||
this.valueParametersSignature = str2;
|
||||
this.isObjectReplacedWithTypeParameter = z3;
|
||||
}
|
||||
|
||||
public static SpecialSignatureInfo valueOf(String str) {
|
||||
return (SpecialSignatureInfo) Enum.valueOf(SpecialSignatureInfo.class, str);
|
||||
}
|
||||
|
||||
public static SpecialSignatureInfo[] values() {
|
||||
return (SpecialSignatureInfo[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class TypeSafeBarrierDescription {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ TypeSafeBarrierDescription[] $VALUES;
|
||||
private final Object defaultValue;
|
||||
public static final TypeSafeBarrierDescription NULL = new TypeSafeBarrierDescription("NULL", 0, null);
|
||||
public static final TypeSafeBarrierDescription INDEX = new TypeSafeBarrierDescription("INDEX", 1, -1);
|
||||
public static final TypeSafeBarrierDescription FALSE = new TypeSafeBarrierDescription("FALSE", 2, Boolean.FALSE);
|
||||
public static final TypeSafeBarrierDescription MAP_GET_OR_DEFAULT = new MAP_GET_OR_DEFAULT("MAP_GET_OR_DEFAULT", 3);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class MAP_GET_OR_DEFAULT extends TypeSafeBarrierDescription {
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public MAP_GET_OR_DEFAULT(java.lang.String r2, int r3) {
|
||||
/*
|
||||
r1 = this;
|
||||
r0 = 0
|
||||
r1.<init>(r2, r3, r0, r0)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.load.java.SpecialGenericSignatures.TypeSafeBarrierDescription.MAP_GET_OR_DEFAULT.<init>(java.lang.String, int):void");
|
||||
}
|
||||
}
|
||||
|
||||
private static final /* synthetic */ TypeSafeBarrierDescription[] $values() {
|
||||
return new TypeSafeBarrierDescription[]{NULL, INDEX, FALSE, MAP_GET_OR_DEFAULT};
|
||||
}
|
||||
|
||||
static {
|
||||
TypeSafeBarrierDescription[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
public /* synthetic */ TypeSafeBarrierDescription(String str, int i, Object obj, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(str, i, obj);
|
||||
}
|
||||
|
||||
public static TypeSafeBarrierDescription valueOf(String str) {
|
||||
return (TypeSafeBarrierDescription) Enum.valueOf(TypeSafeBarrierDescription.class, str);
|
||||
}
|
||||
|
||||
public static TypeSafeBarrierDescription[] values() {
|
||||
return (TypeSafeBarrierDescription[]) $VALUES.clone();
|
||||
}
|
||||
|
||||
private TypeSafeBarrierDescription(String str, int i, Object obj) {
|
||||
this.defaultValue = obj;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
int collectionSizeOrDefault;
|
||||
int collectionSizeOrDefault2;
|
||||
int collectionSizeOrDefault3;
|
||||
int collectionSizeOrDefault4;
|
||||
int collectionSizeOrDefault5;
|
||||
int collectionSizeOrDefault6;
|
||||
int collectionSizeOrDefault7;
|
||||
int collectionSizeOrDefault8;
|
||||
Set<String> of = SetsKt.setOf((Object[]) new String[]{"containsAll", "removeAll", "retainAll"});
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(of, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (String str : of) {
|
||||
Companion companion = Companion;
|
||||
String desc = JvmPrimitiveType.BOOLEAN.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc, "getDesc(...)");
|
||||
arrayList.add(companion.method("java/util/Collection", str, "Ljava/util/Collection;", desc));
|
||||
}
|
||||
ERASED_COLLECTION_PARAMETER_NAME_AND_SIGNATURES = arrayList;
|
||||
collectionSizeOrDefault2 = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList, 10);
|
||||
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault2);
|
||||
Iterator it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList2.add(((Companion.NameAndSignature) it.next()).getSignature());
|
||||
}
|
||||
ERASED_COLLECTION_PARAMETER_SIGNATURES = arrayList2;
|
||||
List<Companion.NameAndSignature> list = ERASED_COLLECTION_PARAMETER_NAME_AND_SIGNATURES;
|
||||
collectionSizeOrDefault3 = CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10);
|
||||
ArrayList arrayList3 = new ArrayList(collectionSizeOrDefault3);
|
||||
Iterator<T> it2 = list.iterator();
|
||||
while (it2.hasNext()) {
|
||||
arrayList3.add(((Companion.NameAndSignature) it2.next()).getName().asString());
|
||||
}
|
||||
ERASED_COLLECTION_PARAMETER_NAMES = arrayList3;
|
||||
SignatureBuildingComponents signatureBuildingComponents = SignatureBuildingComponents.INSTANCE;
|
||||
Companion companion2 = Companion;
|
||||
String javaUtil = signatureBuildingComponents.javaUtil("Collection");
|
||||
JvmPrimitiveType jvmPrimitiveType = JvmPrimitiveType.BOOLEAN;
|
||||
String desc2 = jvmPrimitiveType.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc2, "getDesc(...)");
|
||||
Companion.NameAndSignature method = companion2.method(javaUtil, "contains", "Ljava/lang/Object;", desc2);
|
||||
TypeSafeBarrierDescription typeSafeBarrierDescription = TypeSafeBarrierDescription.FALSE;
|
||||
Pair pair = TuplesKt.to(method, typeSafeBarrierDescription);
|
||||
String javaUtil2 = signatureBuildingComponents.javaUtil("Collection");
|
||||
String desc3 = jvmPrimitiveType.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc3, "getDesc(...)");
|
||||
Pair pair2 = TuplesKt.to(companion2.method(javaUtil2, "remove", "Ljava/lang/Object;", desc3), typeSafeBarrierDescription);
|
||||
String javaUtil3 = signatureBuildingComponents.javaUtil("Map");
|
||||
String desc4 = jvmPrimitiveType.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc4, "getDesc(...)");
|
||||
Pair pair3 = TuplesKt.to(companion2.method(javaUtil3, "containsKey", "Ljava/lang/Object;", desc4), typeSafeBarrierDescription);
|
||||
String javaUtil4 = signatureBuildingComponents.javaUtil("Map");
|
||||
String desc5 = jvmPrimitiveType.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc5, "getDesc(...)");
|
||||
Pair pair4 = TuplesKt.to(companion2.method(javaUtil4, "containsValue", "Ljava/lang/Object;", desc5), typeSafeBarrierDescription);
|
||||
String javaUtil5 = signatureBuildingComponents.javaUtil("Map");
|
||||
String desc6 = jvmPrimitiveType.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc6, "getDesc(...)");
|
||||
Pair pair5 = TuplesKt.to(companion2.method(javaUtil5, "remove", "Ljava/lang/Object;Ljava/lang/Object;", desc6), typeSafeBarrierDescription);
|
||||
Pair pair6 = TuplesKt.to(companion2.method(signatureBuildingComponents.javaUtil("Map"), "getOrDefault", "Ljava/lang/Object;Ljava/lang/Object;", "Ljava/lang/Object;"), TypeSafeBarrierDescription.MAP_GET_OR_DEFAULT);
|
||||
Companion.NameAndSignature method2 = companion2.method(signatureBuildingComponents.javaUtil("Map"), "get", "Ljava/lang/Object;", "Ljava/lang/Object;");
|
||||
TypeSafeBarrierDescription typeSafeBarrierDescription2 = TypeSafeBarrierDescription.NULL;
|
||||
Pair pair7 = TuplesKt.to(method2, typeSafeBarrierDescription2);
|
||||
Pair pair8 = TuplesKt.to(companion2.method(signatureBuildingComponents.javaUtil("Map"), "remove", "Ljava/lang/Object;", "Ljava/lang/Object;"), typeSafeBarrierDescription2);
|
||||
String javaUtil6 = signatureBuildingComponents.javaUtil("List");
|
||||
JvmPrimitiveType jvmPrimitiveType2 = JvmPrimitiveType.INT;
|
||||
String desc7 = jvmPrimitiveType2.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc7, "getDesc(...)");
|
||||
Companion.NameAndSignature method3 = companion2.method(javaUtil6, "indexOf", "Ljava/lang/Object;", desc7);
|
||||
TypeSafeBarrierDescription typeSafeBarrierDescription3 = TypeSafeBarrierDescription.INDEX;
|
||||
Pair pair9 = TuplesKt.to(method3, typeSafeBarrierDescription3);
|
||||
String javaUtil7 = signatureBuildingComponents.javaUtil("List");
|
||||
String desc8 = jvmPrimitiveType2.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc8, "getDesc(...)");
|
||||
Map<Companion.NameAndSignature, TypeSafeBarrierDescription> mapOf = MapsKt.mapOf(pair, pair2, pair3, pair4, pair5, pair6, pair7, pair8, pair9, TuplesKt.to(companion2.method(javaUtil7, "lastIndexOf", "Ljava/lang/Object;", desc8), typeSafeBarrierDescription3));
|
||||
GENERIC_PARAMETERS_METHODS_TO_DEFAULT_VALUES_MAP = mapOf;
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap(MapsKt.mapCapacity(mapOf.size()));
|
||||
Iterator<T> it3 = mapOf.entrySet().iterator();
|
||||
while (it3.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry) it3.next();
|
||||
linkedHashMap.put(((Companion.NameAndSignature) entry.getKey()).getSignature(), entry.getValue());
|
||||
}
|
||||
SIGNATURE_TO_DEFAULT_VALUES_MAP = linkedHashMap;
|
||||
Set plus = SetsKt.plus((Set) GENERIC_PARAMETERS_METHODS_TO_DEFAULT_VALUES_MAP.keySet(), (Iterable) ERASED_COLLECTION_PARAMETER_NAME_AND_SIGNATURES);
|
||||
collectionSizeOrDefault4 = CollectionsKt__IterablesKt.collectionSizeOrDefault(plus, 10);
|
||||
ArrayList arrayList4 = new ArrayList(collectionSizeOrDefault4);
|
||||
Iterator it4 = plus.iterator();
|
||||
while (it4.hasNext()) {
|
||||
arrayList4.add(((Companion.NameAndSignature) it4.next()).getName());
|
||||
}
|
||||
ERASED_VALUE_PARAMETERS_SHORT_NAMES = CollectionsKt.toSet(arrayList4);
|
||||
collectionSizeOrDefault5 = CollectionsKt__IterablesKt.collectionSizeOrDefault(plus, 10);
|
||||
ArrayList arrayList5 = new ArrayList(collectionSizeOrDefault5);
|
||||
Iterator it5 = plus.iterator();
|
||||
while (it5.hasNext()) {
|
||||
arrayList5.add(((Companion.NameAndSignature) it5.next()).getSignature());
|
||||
}
|
||||
ERASED_VALUE_PARAMETERS_SIGNATURES = CollectionsKt.toSet(arrayList5);
|
||||
Companion companion3 = Companion;
|
||||
JvmPrimitiveType jvmPrimitiveType3 = JvmPrimitiveType.INT;
|
||||
String desc9 = jvmPrimitiveType3.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc9, "getDesc(...)");
|
||||
Companion.NameAndSignature method4 = companion3.method("java/util/List", "removeAt", desc9, "Ljava/lang/Object;");
|
||||
REMOVE_AT_NAME_AND_SIGNATURE = method4;
|
||||
SignatureBuildingComponents signatureBuildingComponents2 = SignatureBuildingComponents.INSTANCE;
|
||||
String javaLang = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc10 = JvmPrimitiveType.BYTE.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc10, "getDesc(...)");
|
||||
Pair pair10 = TuplesKt.to(companion3.method(javaLang, "toByte", "", desc10), Name.identifier("byteValue"));
|
||||
String javaLang2 = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc11 = JvmPrimitiveType.SHORT.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc11, "getDesc(...)");
|
||||
Pair pair11 = TuplesKt.to(companion3.method(javaLang2, "toShort", "", desc11), Name.identifier("shortValue"));
|
||||
String javaLang3 = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc12 = jvmPrimitiveType3.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc12, "getDesc(...)");
|
||||
Pair pair12 = TuplesKt.to(companion3.method(javaLang3, "toInt", "", desc12), Name.identifier("intValue"));
|
||||
String javaLang4 = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc13 = JvmPrimitiveType.LONG.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc13, "getDesc(...)");
|
||||
Pair pair13 = TuplesKt.to(companion3.method(javaLang4, "toLong", "", desc13), Name.identifier("longValue"));
|
||||
String javaLang5 = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc14 = JvmPrimitiveType.FLOAT.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc14, "getDesc(...)");
|
||||
Pair pair14 = TuplesKt.to(companion3.method(javaLang5, "toFloat", "", desc14), Name.identifier("floatValue"));
|
||||
String javaLang6 = signatureBuildingComponents2.javaLang("Number");
|
||||
String desc15 = JvmPrimitiveType.DOUBLE.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc15, "getDesc(...)");
|
||||
Pair pair15 = TuplesKt.to(companion3.method(javaLang6, "toDouble", "", desc15), Name.identifier("doubleValue"));
|
||||
Pair pair16 = TuplesKt.to(method4, Name.identifier("remove"));
|
||||
String javaLang7 = signatureBuildingComponents2.javaLang("CharSequence");
|
||||
String desc16 = jvmPrimitiveType3.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc16, "getDesc(...)");
|
||||
String desc17 = JvmPrimitiveType.CHAR.getDesc();
|
||||
Intrinsics.checkNotNullExpressionValue(desc17, "getDesc(...)");
|
||||
Map<Companion.NameAndSignature, Name> mapOf2 = MapsKt.mapOf(pair10, pair11, pair12, pair13, pair14, pair15, pair16, TuplesKt.to(companion3.method(javaLang7, "get", desc16, desc17), Name.identifier("charAt")));
|
||||
NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP = mapOf2;
|
||||
LinkedHashMap linkedHashMap2 = new LinkedHashMap(MapsKt.mapCapacity(mapOf2.size()));
|
||||
Iterator<T> it6 = mapOf2.entrySet().iterator();
|
||||
while (it6.hasNext()) {
|
||||
Map.Entry entry2 = (Map.Entry) it6.next();
|
||||
linkedHashMap2.put(((Companion.NameAndSignature) entry2.getKey()).getSignature(), entry2.getValue());
|
||||
}
|
||||
SIGNATURE_TO_JVM_REPRESENTATION_NAME = linkedHashMap2;
|
||||
Map<Companion.NameAndSignature, Name> map = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP;
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
for (Map.Entry<Companion.NameAndSignature, Name> entry3 : map.entrySet()) {
|
||||
linkedHashSet.add(Companion.NameAndSignature.copy$default(entry3.getKey(), null, entry3.getValue(), null, null, 13, null).getSignature());
|
||||
}
|
||||
JVM_SIGNATURES_FOR_RENAMED_BUILT_INS = linkedHashSet;
|
||||
Set<Companion.NameAndSignature> keySet = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.keySet();
|
||||
collectionSizeOrDefault6 = CollectionsKt__IterablesKt.collectionSizeOrDefault(keySet, 10);
|
||||
ArrayList arrayList6 = new ArrayList(collectionSizeOrDefault6);
|
||||
Iterator<T> it7 = keySet.iterator();
|
||||
while (it7.hasNext()) {
|
||||
arrayList6.add(((Companion.NameAndSignature) it7.next()).getName());
|
||||
}
|
||||
ORIGINAL_SHORT_NAMES = arrayList6;
|
||||
Set<Map.Entry<Companion.NameAndSignature, Name>> entrySet = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.entrySet();
|
||||
collectionSizeOrDefault7 = CollectionsKt__IterablesKt.collectionSizeOrDefault(entrySet, 10);
|
||||
ArrayList arrayList7 = new ArrayList(collectionSizeOrDefault7);
|
||||
Iterator<T> it8 = entrySet.iterator();
|
||||
while (it8.hasNext()) {
|
||||
Map.Entry entry4 = (Map.Entry) it8.next();
|
||||
arrayList7.add(new Pair(((Companion.NameAndSignature) entry4.getKey()).getName(), entry4.getValue()));
|
||||
}
|
||||
collectionSizeOrDefault8 = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList7, 10);
|
||||
LinkedHashMap linkedHashMap3 = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(collectionSizeOrDefault8), 16));
|
||||
Iterator it9 = arrayList7.iterator();
|
||||
while (it9.hasNext()) {
|
||||
Pair pair17 = (Pair) it9.next();
|
||||
linkedHashMap3.put((Name) pair17.getSecond(), (Name) pair17.getFirst());
|
||||
}
|
||||
JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP = linkedHashMap3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java;
|
||||
|
||||
import java.util.Iterator;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Visibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaWildcardType;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nutils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 utils.kt\norg/jetbrains/kotlin/load/java/UtilsKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,49:1\n1#2:50\n12474#3,2:51\n*S KotlinDebug\n*F\n+ 1 utils.kt\norg/jetbrains/kotlin/load/java/UtilsKt\n*L\n47#1:51,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class UtilsKt {
|
||||
public static final AnnotationDescriptor extractNullabilityAnnotationOnBoundedWildcard(LazyJavaResolverContext c4, JavaWildcardType wildcardType) {
|
||||
AnnotationDescriptor annotationDescriptor;
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(wildcardType, "wildcardType");
|
||||
if (wildcardType.getBound() == null) {
|
||||
throw new IllegalArgumentException("Nullability annotations on unbounded wildcards aren't supported");
|
||||
}
|
||||
Iterator<AnnotationDescriptor> it = new LazyJavaAnnotations(c4, wildcardType, false, 4, null).iterator();
|
||||
loop0: while (true) {
|
||||
if (!it.hasNext()) {
|
||||
annotationDescriptor = null;
|
||||
break;
|
||||
}
|
||||
annotationDescriptor = it.next();
|
||||
AnnotationDescriptor annotationDescriptor2 = annotationDescriptor;
|
||||
for (FqName fqName : JavaNullabilityAnnotationSettingsKt.getRXJAVA3_ANNOTATIONS()) {
|
||||
if (Intrinsics.areEqual(annotationDescriptor2.getFqName(), fqName)) {
|
||||
break loop0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return annotationDescriptor;
|
||||
}
|
||||
|
||||
public static final boolean hasErasedValueParameters(CallableMemberDescriptor memberDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(memberDescriptor, "memberDescriptor");
|
||||
return (memberDescriptor instanceof FunctionDescriptor) && Intrinsics.areEqual(memberDescriptor.getUserData(JavaMethodDescriptor.HAS_ERASED_VALUE_PARAMETERS), Boolean.TRUE);
|
||||
}
|
||||
|
||||
public static final boolean isJspecifyEnabledInStrictMode(JavaTypeEnhancementState javaTypeEnhancementState) {
|
||||
Intrinsics.checkNotNullParameter(javaTypeEnhancementState, "javaTypeEnhancementState");
|
||||
return javaTypeEnhancementState.getGetReportLevelForAnnotation().invoke(JavaNullabilityAnnotationSettingsKt.getJSPECIFY_ANNOTATIONS_PACKAGE()) == ReportLevel.STRICT;
|
||||
}
|
||||
|
||||
public static final DescriptorVisibility toDescriptorVisibility(Visibility visibility) {
|
||||
Intrinsics.checkNotNullParameter(visibility, "<this>");
|
||||
DescriptorVisibility descriptorVisibility = JavaDescriptorVisibilities.toDescriptorVisibility(visibility);
|
||||
Intrinsics.checkNotNullExpressionValue(descriptorVisibility, "toDescriptorVisibility(...)");
|
||||
return descriptorVisibility;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.NonReportingOverrideStrategy;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
|
||||
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ErrorReporter;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DescriptorResolverUtils {
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = i != 18 ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
|
||||
Object[] objArr = new Object[i != 18 ? 3 : 2];
|
||||
switch (i) {
|
||||
case 1:
|
||||
case 7:
|
||||
case 13:
|
||||
objArr[0] = "membersFromSupertypes";
|
||||
break;
|
||||
case 2:
|
||||
case 8:
|
||||
case 14:
|
||||
objArr[0] = "membersFromCurrent";
|
||||
break;
|
||||
case 3:
|
||||
case 9:
|
||||
case 15:
|
||||
objArr[0] = "classDescriptor";
|
||||
break;
|
||||
case 4:
|
||||
case 10:
|
||||
case 16:
|
||||
objArr[0] = "errorReporter";
|
||||
break;
|
||||
case 5:
|
||||
case 11:
|
||||
case 17:
|
||||
objArr[0] = "overridingUtil";
|
||||
break;
|
||||
case 6:
|
||||
case 12:
|
||||
case 19:
|
||||
default:
|
||||
objArr[0] = AppMeasurementSdk.ConditionalUserProperty.NAME;
|
||||
break;
|
||||
case 18:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils";
|
||||
break;
|
||||
case 20:
|
||||
objArr[0] = "annotationClass";
|
||||
break;
|
||||
}
|
||||
if (i != 18) {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils";
|
||||
} else {
|
||||
objArr[1] = "resolveOverrides";
|
||||
}
|
||||
switch (i) {
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
objArr[2] = "resolveOverridesForStaticMembers";
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
objArr[2] = "resolveOverrides";
|
||||
break;
|
||||
case 18:
|
||||
break;
|
||||
case 19:
|
||||
case 20:
|
||||
objArr[2] = "getAnnotationParameterByName";
|
||||
break;
|
||||
default:
|
||||
objArr[2] = "resolveOverridesForNonStaticMembers";
|
||||
break;
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i == 18) {
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
}
|
||||
|
||||
public static ValueParameterDescriptor getAnnotationParameterByName(Name name, ClassDescriptor classDescriptor) {
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(19);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(20);
|
||||
}
|
||||
Collection<ClassConstructorDescriptor> constructors = classDescriptor.getConstructors();
|
||||
if (constructors.size() != 1) {
|
||||
return null;
|
||||
}
|
||||
for (ValueParameterDescriptor valueParameterDescriptor : constructors.iterator().next().getValueParameters()) {
|
||||
if (valueParameterDescriptor.getName().equals(name)) {
|
||||
return valueParameterDescriptor;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static <D extends CallableMemberDescriptor> Collection<D> resolveOverrides(Name name, Collection<D> collection, Collection<D> collection2, ClassDescriptor classDescriptor, final ErrorReporter errorReporter, OverridingUtil overridingUtil, final boolean z3) {
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(12);
|
||||
}
|
||||
if (collection == null) {
|
||||
$$$reportNull$$$0(13);
|
||||
}
|
||||
if (collection2 == null) {
|
||||
$$$reportNull$$$0(14);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(15);
|
||||
}
|
||||
if (errorReporter == null) {
|
||||
$$$reportNull$$$0(16);
|
||||
}
|
||||
if (overridingUtil == null) {
|
||||
$$$reportNull$$$0(17);
|
||||
}
|
||||
final LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
overridingUtil.generateOverridesInFunctionGroup(name, collection, collection2, classDescriptor, new NonReportingOverrideStrategy() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.DescriptorResolverUtils.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i == 1) {
|
||||
objArr[0] = "fromSuper";
|
||||
} else if (i == 2) {
|
||||
objArr[0] = "fromCurrent";
|
||||
} else if (i == 3) {
|
||||
objArr[0] = "member";
|
||||
} else if (i != 4) {
|
||||
objArr[0] = "fakeOverride";
|
||||
} else {
|
||||
objArr[0] = "overridden";
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils$1";
|
||||
if (i == 1 || i == 2) {
|
||||
objArr[2] = "conflict";
|
||||
} else if (i == 3 || i == 4) {
|
||||
objArr[2] = "setOverriddenDescriptors";
|
||||
} else {
|
||||
objArr[2] = "addFakeOverride";
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.OverridingStrategy
|
||||
public void addFakeOverride(CallableMemberDescriptor callableMemberDescriptor) {
|
||||
if (callableMemberDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
OverridingUtil.resolveUnknownVisibilityForMember(callableMemberDescriptor, new Function1<CallableMemberDescriptor, Unit>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.DescriptorResolverUtils.1.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
throw new IllegalArgumentException("Argument for @NotNull parameter 'descriptor' of kotlin/reflect/jvm/internal/impl/load/java/components/DescriptorResolverUtils$1$1.invoke must not be null");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public Unit invoke(CallableMemberDescriptor callableMemberDescriptor2) {
|
||||
if (callableMemberDescriptor2 == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
ErrorReporter.this.reportCannotInferVisibility(callableMemberDescriptor2);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
});
|
||||
linkedHashSet.add(callableMemberDescriptor);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.NonReportingOverrideStrategy
|
||||
public void conflict(CallableMemberDescriptor callableMemberDescriptor, CallableMemberDescriptor callableMemberDescriptor2) {
|
||||
if (callableMemberDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (callableMemberDescriptor2 == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.OverridingStrategy
|
||||
public void setOverriddenDescriptors(CallableMemberDescriptor callableMemberDescriptor, Collection<? extends CallableMemberDescriptor> collection3) {
|
||||
if (callableMemberDescriptor == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (collection3 == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
if (!z3 || callableMemberDescriptor.getKind() == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
|
||||
super.setOverriddenDescriptors(callableMemberDescriptor, collection3);
|
||||
}
|
||||
}
|
||||
});
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
public static <D extends CallableMemberDescriptor> Collection<D> resolveOverridesForNonStaticMembers(Name name, Collection<D> collection, Collection<D> collection2, ClassDescriptor classDescriptor, ErrorReporter errorReporter, OverridingUtil overridingUtil) {
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (collection == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (collection2 == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (errorReporter == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
if (overridingUtil == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
return resolveOverrides(name, collection, collection2, classDescriptor, errorReporter, overridingUtil, false);
|
||||
}
|
||||
|
||||
public static <D extends CallableMemberDescriptor> Collection<D> resolveOverridesForStaticMembers(Name name, Collection<D> collection, Collection<D> collection2, ClassDescriptor classDescriptor, ErrorReporter errorReporter, OverridingUtil overridingUtil) {
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
if (collection == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
if (collection2 == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(9);
|
||||
}
|
||||
if (errorReporter == null) {
|
||||
$$$reportNull$$$0(10);
|
||||
}
|
||||
if (overridingUtil == null) {
|
||||
$$$reportNull$$$0(11);
|
||||
}
|
||||
return resolveOverrides(name, collection, collection2, classDescriptor, errorReporter, overridingUtil, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
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;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJavaAnnotationMapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaAnnotationMapper.kt\norg/jetbrains/kotlin/load/java/components/JavaAnnotationDescriptor\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,182:1\n1#2:183\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class JavaAnnotationDescriptor implements AnnotationDescriptor, PossiblyExternalAnnotationDescriptor {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JavaAnnotationDescriptor.class), "type", "getType()Lorg/jetbrains/kotlin/types/SimpleType;"))};
|
||||
private final JavaAnnotationArgument firstArgument;
|
||||
private final FqName fqName;
|
||||
private final boolean isIdeExternalAnnotation;
|
||||
private final SourceElement source;
|
||||
private final NotNullLazyValue type$delegate;
|
||||
|
||||
public JavaAnnotationDescriptor(final LazyJavaResolverContext c4, JavaAnnotation javaAnnotation, FqName fqName) {
|
||||
SourceElement NO_SOURCE;
|
||||
Collection<JavaAnnotationArgument> arguments;
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
this.fqName = fqName;
|
||||
if (javaAnnotation == null || (NO_SOURCE = c4.getComponents().getSourceElementFactory().source(javaAnnotation)) == null) {
|
||||
NO_SOURCE = SourceElement.NO_SOURCE;
|
||||
Intrinsics.checkNotNullExpressionValue(NO_SOURCE, "NO_SOURCE");
|
||||
}
|
||||
this.source = NO_SOURCE;
|
||||
this.type$delegate = c4.getStorageManager().createLazyValue(new Function0<SimpleType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationDescriptor$type$2
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final SimpleType invoke() {
|
||||
SimpleType defaultType = LazyJavaResolverContext.this.getModule().getBuiltIns().getBuiltInClassByFqName(this.getFqName()).getDefaultType();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
|
||||
return defaultType;
|
||||
}
|
||||
});
|
||||
this.firstArgument = (javaAnnotation == null || (arguments = javaAnnotation.getArguments()) == null) ? null : (JavaAnnotationArgument) CollectionsKt.firstOrNull(arguments);
|
||||
boolean z3 = false;
|
||||
if (javaAnnotation != null && javaAnnotation.isIdeExternalAnnotation()) {
|
||||
z3 = true;
|
||||
}
|
||||
this.isIdeExternalAnnotation = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public Map<Name, ConstantValue<?>> getAllValueArguments() {
|
||||
return MapsKt.emptyMap();
|
||||
}
|
||||
|
||||
public final JavaAnnotationArgument getFirstArgument() {
|
||||
return this.firstArgument;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public FqName getFqName() {
|
||||
return this.fqName;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
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
|
||||
public SimpleType getType() {
|
||||
return (SimpleType) StorageKt.getValue(this.type$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JvmAnnotationNames;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaAnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationOwner;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaAnnotationMapper {
|
||||
private static final Name DEPRECATED_ANNOTATION_MESSAGE;
|
||||
public static final JavaAnnotationMapper INSTANCE = new JavaAnnotationMapper();
|
||||
private static final Name RETENTION_ANNOTATION_VALUE;
|
||||
private static final Name TARGET_ANNOTATION_ALLOWED_TARGETS;
|
||||
private static final Map<FqName, FqName> kotlinToJavaNameMap;
|
||||
|
||||
static {
|
||||
Name identifier = Name.identifier("message");
|
||||
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
|
||||
DEPRECATED_ANNOTATION_MESSAGE = identifier;
|
||||
Name identifier2 = Name.identifier("allowedTargets");
|
||||
Intrinsics.checkNotNullExpressionValue(identifier2, "identifier(...)");
|
||||
TARGET_ANNOTATION_ALLOWED_TARGETS = identifier2;
|
||||
Name identifier3 = Name.identifier("value");
|
||||
Intrinsics.checkNotNullExpressionValue(identifier3, "identifier(...)");
|
||||
RETENTION_ANNOTATION_VALUE = identifier3;
|
||||
kotlinToJavaNameMap = MapsKt.mapOf(TuplesKt.to(StandardNames.FqNames.target, JvmAnnotationNames.TARGET_ANNOTATION), TuplesKt.to(StandardNames.FqNames.retention, JvmAnnotationNames.RETENTION_ANNOTATION), TuplesKt.to(StandardNames.FqNames.mustBeDocumented, JvmAnnotationNames.DOCUMENTED_ANNOTATION));
|
||||
}
|
||||
|
||||
private JavaAnnotationMapper() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ AnnotationDescriptor mapOrResolveJavaAnnotation$default(JavaAnnotationMapper javaAnnotationMapper, JavaAnnotation javaAnnotation, LazyJavaResolverContext lazyJavaResolverContext, boolean z3, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
z3 = false;
|
||||
}
|
||||
return javaAnnotationMapper.mapOrResolveJavaAnnotation(javaAnnotation, lazyJavaResolverContext, z3);
|
||||
}
|
||||
|
||||
public final AnnotationDescriptor findMappedJavaAnnotation(FqName kotlinName, JavaAnnotationOwner annotationOwner, LazyJavaResolverContext c4) {
|
||||
JavaAnnotation findAnnotation;
|
||||
Intrinsics.checkNotNullParameter(kotlinName, "kotlinName");
|
||||
Intrinsics.checkNotNullParameter(annotationOwner, "annotationOwner");
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
if (Intrinsics.areEqual(kotlinName, StandardNames.FqNames.deprecated)) {
|
||||
FqName DEPRECATED_ANNOTATION = JvmAnnotationNames.DEPRECATED_ANNOTATION;
|
||||
Intrinsics.checkNotNullExpressionValue(DEPRECATED_ANNOTATION, "DEPRECATED_ANNOTATION");
|
||||
JavaAnnotation findAnnotation2 = annotationOwner.findAnnotation(DEPRECATED_ANNOTATION);
|
||||
if (findAnnotation2 != null || annotationOwner.isDeprecatedInJavaDoc()) {
|
||||
return new JavaDeprecatedAnnotationDescriptor(findAnnotation2, c4);
|
||||
}
|
||||
}
|
||||
FqName fqName = kotlinToJavaNameMap.get(kotlinName);
|
||||
if (fqName == null || (findAnnotation = annotationOwner.findAnnotation(fqName)) == null) {
|
||||
return null;
|
||||
}
|
||||
return mapOrResolveJavaAnnotation$default(INSTANCE, findAnnotation, c4, false, 4, null);
|
||||
}
|
||||
|
||||
public final Name getDEPRECATED_ANNOTATION_MESSAGE$descriptors_jvm() {
|
||||
return DEPRECATED_ANNOTATION_MESSAGE;
|
||||
}
|
||||
|
||||
public final Name getRETENTION_ANNOTATION_VALUE$descriptors_jvm() {
|
||||
return RETENTION_ANNOTATION_VALUE;
|
||||
}
|
||||
|
||||
public final Name getTARGET_ANNOTATION_ALLOWED_TARGETS$descriptors_jvm() {
|
||||
return TARGET_ANNOTATION_ALLOWED_TARGETS;
|
||||
}
|
||||
|
||||
public final AnnotationDescriptor mapOrResolveJavaAnnotation(JavaAnnotation annotation, LazyJavaResolverContext c4, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
ClassId classId = annotation.getClassId();
|
||||
if (Intrinsics.areEqual(classId, ClassId.topLevel(JvmAnnotationNames.TARGET_ANNOTATION))) {
|
||||
return new JavaTargetAnnotationDescriptor(annotation, c4);
|
||||
}
|
||||
if (Intrinsics.areEqual(classId, ClassId.topLevel(JvmAnnotationNames.RETENTION_ANNOTATION))) {
|
||||
return new JavaRetentionAnnotationDescriptor(annotation, c4);
|
||||
}
|
||||
if (Intrinsics.areEqual(classId, ClassId.topLevel(JvmAnnotationNames.DOCUMENTED_ANNOTATION))) {
|
||||
return new JavaAnnotationDescriptor(c4, annotation, StandardNames.FqNames.mustBeDocumented);
|
||||
}
|
||||
if (Intrinsics.areEqual(classId, ClassId.topLevel(JvmAnnotationNames.DEPRECATED_ANNOTATION))) {
|
||||
return null;
|
||||
}
|
||||
return new LazyJavaAnnotationDescriptor(c4, annotation, z3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.KotlinRetention;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.KotlinTarget;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaEnumValueAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ArrayValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.EnumValue;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJavaAnnotationMapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaAnnotationMapper.kt\norg/jetbrains/kotlin/load/java/components/JavaAnnotationTargetMapper\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,182:1\n800#2,11:183\n1360#2:194\n1446#2,5:195\n1549#2:200\n1620#2,3:201\n*S KotlinDebug\n*F\n+ 1 JavaAnnotationMapper.kt\norg/jetbrains/kotlin/load/java/components/JavaAnnotationTargetMapper\n*L\n153#1:183,11\n154#1:194\n154#1:195,5\n155#1:200\n155#1:201,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaAnnotationTargetMapper {
|
||||
public static final JavaAnnotationTargetMapper INSTANCE = new JavaAnnotationTargetMapper();
|
||||
private static final Map<String, EnumSet<KotlinTarget>> targetNameLists = MapsKt.mapOf(TuplesKt.to("PACKAGE", EnumSet.noneOf(KotlinTarget.class)), TuplesKt.to("TYPE", EnumSet.of(KotlinTarget.CLASS, KotlinTarget.FILE)), TuplesKt.to("ANNOTATION_TYPE", EnumSet.of(KotlinTarget.ANNOTATION_CLASS)), TuplesKt.to("TYPE_PARAMETER", EnumSet.of(KotlinTarget.TYPE_PARAMETER)), TuplesKt.to("FIELD", EnumSet.of(KotlinTarget.FIELD)), TuplesKt.to("LOCAL_VARIABLE", EnumSet.of(KotlinTarget.LOCAL_VARIABLE)), TuplesKt.to("PARAMETER", EnumSet.of(KotlinTarget.VALUE_PARAMETER)), TuplesKt.to("CONSTRUCTOR", EnumSet.of(KotlinTarget.CONSTRUCTOR)), TuplesKt.to("METHOD", EnumSet.of(KotlinTarget.FUNCTION, KotlinTarget.PROPERTY_GETTER, KotlinTarget.PROPERTY_SETTER)), TuplesKt.to("TYPE_USE", EnumSet.of(KotlinTarget.TYPE)));
|
||||
private static final Map<String, KotlinRetention> retentionNameList = MapsKt.mapOf(TuplesKt.to("RUNTIME", KotlinRetention.RUNTIME), TuplesKt.to("CLASS", KotlinRetention.BINARY), TuplesKt.to("SOURCE", KotlinRetention.SOURCE));
|
||||
|
||||
private JavaAnnotationTargetMapper() {
|
||||
}
|
||||
|
||||
public final ConstantValue<?> mapJavaRetentionArgument$descriptors_jvm(JavaAnnotationArgument javaAnnotationArgument) {
|
||||
JavaEnumValueAnnotationArgument javaEnumValueAnnotationArgument = javaAnnotationArgument instanceof JavaEnumValueAnnotationArgument ? (JavaEnumValueAnnotationArgument) javaAnnotationArgument : null;
|
||||
if (javaEnumValueAnnotationArgument != null) {
|
||||
Map<String, KotlinRetention> map = retentionNameList;
|
||||
Name entryName = javaEnumValueAnnotationArgument.getEntryName();
|
||||
KotlinRetention kotlinRetention = map.get(entryName != null ? entryName.asString() : null);
|
||||
if (kotlinRetention != null) {
|
||||
ClassId classId = ClassId.topLevel(StandardNames.FqNames.annotationRetention);
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
Name identifier = Name.identifier(kotlinRetention.name());
|
||||
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
|
||||
return new EnumValue(classId, identifier);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Set<KotlinTarget> mapJavaTargetArgumentByName(String str) {
|
||||
EnumSet<KotlinTarget> enumSet = targetNameLists.get(str);
|
||||
return enumSet != null ? enumSet : SetsKt.emptySet();
|
||||
}
|
||||
|
||||
public final ConstantValue<?> mapJavaTargetArguments$descriptors_jvm(List<? extends JavaAnnotationArgument> arguments) {
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(arguments, "arguments");
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Object obj : arguments) {
|
||||
if (obj instanceof JavaEnumValueAnnotationArgument) {
|
||||
arrayList.add(obj);
|
||||
}
|
||||
}
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
Iterator it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
JavaEnumValueAnnotationArgument javaEnumValueAnnotationArgument = (JavaEnumValueAnnotationArgument) it.next();
|
||||
JavaAnnotationTargetMapper javaAnnotationTargetMapper = INSTANCE;
|
||||
Name entryName = javaEnumValueAnnotationArgument.getEntryName();
|
||||
CollectionsKt__MutableCollectionsKt.addAll(arrayList2, javaAnnotationTargetMapper.mapJavaTargetArgumentByName(entryName != null ? entryName.asString() : null));
|
||||
}
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList2, 10);
|
||||
ArrayList arrayList3 = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator it2 = arrayList2.iterator();
|
||||
while (it2.hasNext()) {
|
||||
KotlinTarget kotlinTarget = (KotlinTarget) it2.next();
|
||||
ClassId classId = ClassId.topLevel(StandardNames.FqNames.annotationTarget);
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
Name identifier = Name.identifier(kotlinTarget.name());
|
||||
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
|
||||
arrayList3.add(new EnumValue(classId, identifier));
|
||||
}
|
||||
return new ArrayValue(arrayList3, new Function1<ModuleDescriptor, KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationTargetMapper$mapJavaTargetArguments$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final KotlinType invoke(ModuleDescriptor module) {
|
||||
Intrinsics.checkNotNullParameter(module, "module");
|
||||
ValueParameterDescriptor annotationParameterByName = DescriptorResolverUtils.getAnnotationParameterByName(JavaAnnotationMapper.INSTANCE.getTARGET_ANNOTATION_ALLOWED_TARGETS$descriptors_jvm(), module.getBuiltIns().getBuiltInClassByFqName(StandardNames.FqNames.target));
|
||||
KotlinType type = annotationParameterByName != null ? annotationParameterByName.getType() : null;
|
||||
return type == null ? ErrorUtils.createErrorType(ErrorTypeKind.UNMAPPED_ANNOTATION_TARGET_TYPE, new String[0]) : type;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
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.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.StringValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaDeprecatedAnnotationDescriptor extends JavaAnnotationDescriptor {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JavaDeprecatedAnnotationDescriptor.class), "allValueArguments", "getAllValueArguments()Ljava/util/Map;"))};
|
||||
private final NotNullLazyValue allValueArguments$delegate;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaDeprecatedAnnotationDescriptor(JavaAnnotation javaAnnotation, LazyJavaResolverContext c4) {
|
||||
super(c4, javaAnnotation, StandardNames.FqNames.deprecated);
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
this.allValueArguments$delegate = c4.getStorageManager().createLazyValue(new Function0<Map<Name, ? extends StringValue>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaDeprecatedAnnotationDescriptor$allValueArguments$2
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Map<Name, ? extends StringValue> invoke() {
|
||||
return MapsKt.mapOf(TuplesKt.to(JavaAnnotationMapper.INSTANCE.getDEPRECATED_ANNOTATION_MESSAGE$descriptors_jvm(), new StringValue("Deprecated in Java")));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public Map<Name, ConstantValue<?>> getAllValueArguments() {
|
||||
return (Map) StorageKt.getValue(this.allValueArguments$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaField;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaPropertyInitializerEvaluator {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class DoNothing implements JavaPropertyInitializerEvaluator {
|
||||
public static final DoNothing INSTANCE = new DoNothing();
|
||||
|
||||
private DoNothing() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaPropertyInitializerEvaluator
|
||||
public ConstantValue<?> getInitializerConstant(JavaField field, PropertyDescriptor descriptor) {
|
||||
Intrinsics.checkNotNullParameter(field, "field");
|
||||
Intrinsics.checkNotNullParameter(descriptor, "descriptor");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
ConstantValue<?> getInitializerConstant(JavaField javaField, PropertyDescriptor propertyDescriptor);
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ConstructorDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaElement;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaField;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMember;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaResolverCache {
|
||||
public static final JavaResolverCache EMPTY = new JavaResolverCache() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
objArr[0] = "member";
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
case 8:
|
||||
objArr[0] = "descriptor";
|
||||
break;
|
||||
case 3:
|
||||
objArr[0] = "element";
|
||||
break;
|
||||
case 5:
|
||||
objArr[0] = "field";
|
||||
break;
|
||||
case 7:
|
||||
objArr[0] = "javaClass";
|
||||
break;
|
||||
default:
|
||||
objArr[0] = "fqName";
|
||||
break;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/JavaResolverCache$1";
|
||||
switch (i) {
|
||||
case 1:
|
||||
case 2:
|
||||
objArr[2] = "recordMethod";
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
objArr[2] = "recordConstructor";
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
objArr[2] = "recordField";
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
objArr[2] = "recordClass";
|
||||
break;
|
||||
default:
|
||||
objArr[2] = "getClassResolvedFromSource";
|
||||
break;
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache
|
||||
public ClassDescriptor getClassResolvedFromSource(FqName fqName) {
|
||||
if (fqName != null) {
|
||||
return null;
|
||||
}
|
||||
$$$reportNull$$$0(0);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache
|
||||
public void recordClass(JavaClass javaClass, ClassDescriptor classDescriptor) {
|
||||
if (javaClass == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache
|
||||
public void recordConstructor(JavaElement javaElement, ConstructorDescriptor constructorDescriptor) {
|
||||
if (javaElement == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (constructorDescriptor == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache
|
||||
public void recordField(JavaField javaField, PropertyDescriptor propertyDescriptor) {
|
||||
if (javaField == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
if (propertyDescriptor == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache
|
||||
public void recordMethod(JavaMember javaMember, SimpleFunctionDescriptor simpleFunctionDescriptor) {
|
||||
if (javaMember == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (simpleFunctionDescriptor == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ClassDescriptor getClassResolvedFromSource(FqName fqName);
|
||||
|
||||
void recordClass(JavaClass javaClass, ClassDescriptor classDescriptor);
|
||||
|
||||
void recordConstructor(JavaElement javaElement, ConstructorDescriptor constructorDescriptor);
|
||||
|
||||
void recordField(JavaField javaField, PropertyDescriptor propertyDescriptor);
|
||||
|
||||
void recordMethod(JavaMember javaMember, SimpleFunctionDescriptor simpleFunctionDescriptor);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
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.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;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaRetentionAnnotationDescriptor extends JavaAnnotationDescriptor {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JavaRetentionAnnotationDescriptor.class), "allValueArguments", "getAllValueArguments()Ljava/util/Map;"))};
|
||||
private final NotNullLazyValue allValueArguments$delegate;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaRetentionAnnotationDescriptor(JavaAnnotation annotation, LazyJavaResolverContext c4) {
|
||||
super(c4, annotation, StandardNames.FqNames.retention);
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
this.allValueArguments$delegate = c4.getStorageManager().createLazyValue(new Function0<Map<Name, ? extends ConstantValue<?>>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaRetentionAnnotationDescriptor$allValueArguments$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Map<Name, ? extends ConstantValue<?>> invoke() {
|
||||
ConstantValue<?> mapJavaRetentionArgument$descriptors_jvm = JavaAnnotationTargetMapper.INSTANCE.mapJavaRetentionArgument$descriptors_jvm(JavaRetentionAnnotationDescriptor.this.getFirstArgument());
|
||||
Map<Name, ? extends ConstantValue<?>> mapOf = mapJavaRetentionArgument$descriptors_jvm != null ? MapsKt.mapOf(TuplesKt.to(JavaAnnotationMapper.INSTANCE.getRETENTION_ANNOTATION_VALUE$descriptors_jvm(), mapJavaRetentionArgument$descriptors_jvm)) : null;
|
||||
return mapOf == null ? MapsKt.emptyMap() : mapOf;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public Map<Name, ConstantValue<?>> getAllValueArguments() {
|
||||
return (Map) StorageKt.getValue(this.allValueArguments$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
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.load.java.structure.JavaArrayAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaEnumValueAnnotationArgument;
|
||||
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;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTargetAnnotationDescriptor extends JavaAnnotationDescriptor {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JavaTargetAnnotationDescriptor.class), "allValueArguments", "getAllValueArguments()Ljava/util/Map;"))};
|
||||
private final NotNullLazyValue allValueArguments$delegate;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaTargetAnnotationDescriptor(JavaAnnotation annotation, LazyJavaResolverContext c4) {
|
||||
super(c4, annotation, StandardNames.FqNames.target);
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
this.allValueArguments$delegate = c4.getStorageManager().createLazyValue(new Function0<Map<Name, ? extends ConstantValue<? extends Object>>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.JavaTargetAnnotationDescriptor$allValueArguments$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Map<Name, ? extends ConstantValue<? extends Object>> invoke() {
|
||||
ConstantValue<?> mapJavaTargetArguments$descriptors_jvm;
|
||||
JavaAnnotationArgument firstArgument = JavaTargetAnnotationDescriptor.this.getFirstArgument();
|
||||
if (firstArgument instanceof JavaArrayAnnotationArgument) {
|
||||
mapJavaTargetArguments$descriptors_jvm = JavaAnnotationTargetMapper.INSTANCE.mapJavaTargetArguments$descriptors_jvm(((JavaArrayAnnotationArgument) JavaTargetAnnotationDescriptor.this.getFirstArgument()).getElements());
|
||||
} else {
|
||||
mapJavaTargetArguments$descriptors_jvm = firstArgument instanceof JavaEnumValueAnnotationArgument ? JavaAnnotationTargetMapper.INSTANCE.mapJavaTargetArguments$descriptors_jvm(CollectionsKt.listOf(JavaTargetAnnotationDescriptor.this.getFirstArgument())) : null;
|
||||
}
|
||||
Map<Name, ? extends ConstantValue<? extends Object>> mapOf = mapJavaTargetArguments$descriptors_jvm != null ? MapsKt.mapOf(TuplesKt.to(JavaAnnotationMapper.INSTANCE.getTARGET_ANNOTATION_ALLOWED_TARGETS$descriptors_jvm(), mapJavaTargetArguments$descriptors_jvm)) : null;
|
||||
return mapOf == null ? MapsKt.emptyMap() : mapOf;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public Map<Name, ConstantValue<Object>> getAllValueArguments() {
|
||||
return (Map) StorageKt.getValue(this.allValueArguments$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.components;
|
||||
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMethod;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SignaturePropagator {
|
||||
public static final SignaturePropagator DO_NOTHING = new SignaturePropagator() { // from class: kotlin.reflect.jvm.internal.impl.load.java.components.SignaturePropagator.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
objArr[0] = "owner";
|
||||
break;
|
||||
case 2:
|
||||
objArr[0] = "returnType";
|
||||
break;
|
||||
case 3:
|
||||
objArr[0] = "valueParameters";
|
||||
break;
|
||||
case 4:
|
||||
objArr[0] = "typeParameters";
|
||||
break;
|
||||
case 5:
|
||||
objArr[0] = "descriptor";
|
||||
break;
|
||||
case 6:
|
||||
objArr[0] = "signatureErrors";
|
||||
break;
|
||||
default:
|
||||
objArr[0] = FirebaseAnalytics.Param.METHOD;
|
||||
break;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/SignaturePropagator$1";
|
||||
if (i == 5 || i == 6) {
|
||||
objArr[2] = "reportSignatureErrors";
|
||||
} else {
|
||||
objArr[2] = "resolvePropagatedSignature";
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.SignaturePropagator
|
||||
public void reportSignatureErrors(CallableMemberDescriptor callableMemberDescriptor, List<String> list) {
|
||||
if (callableMemberDescriptor == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
throw new UnsupportedOperationException("Should not be called");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.components.SignaturePropagator
|
||||
public PropagatedSignature resolvePropagatedSignature(JavaMethod javaMethod, ClassDescriptor classDescriptor, KotlinType kotlinType, KotlinType kotlinType2, List<ValueParameterDescriptor> list, List<TypeParameterDescriptor> list2) {
|
||||
if (javaMethod == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (kotlinType == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (list2 == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
return new PropagatedSignature(kotlinType, kotlinType2, list, list2, Collections.EMPTY_LIST, false);
|
||||
}
|
||||
};
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class PropagatedSignature {
|
||||
private final boolean hasStableParameterNames;
|
||||
private final KotlinType receiverType;
|
||||
private final KotlinType returnType;
|
||||
private final List<String> signatureErrors;
|
||||
private final List<TypeParameterDescriptor> typeParameters;
|
||||
private final List<ValueParameterDescriptor> valueParameters;
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = (i == 4 || i == 5 || i == 6 || i == 7) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
|
||||
Object[] objArr = new Object[(i == 4 || i == 5 || i == 6 || i == 7) ? 2 : 3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
objArr[0] = "valueParameters";
|
||||
break;
|
||||
case 2:
|
||||
objArr[0] = "typeParameters";
|
||||
break;
|
||||
case 3:
|
||||
objArr[0] = "signatureErrors";
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/components/SignaturePropagator$PropagatedSignature";
|
||||
break;
|
||||
default:
|
||||
objArr[0] = "returnType";
|
||||
break;
|
||||
}
|
||||
if (i == 4) {
|
||||
objArr[1] = "getReturnType";
|
||||
} else if (i == 5) {
|
||||
objArr[1] = "getValueParameters";
|
||||
} else if (i == 6) {
|
||||
objArr[1] = "getTypeParameters";
|
||||
} else if (i != 7) {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/components/SignaturePropagator$PropagatedSignature";
|
||||
} else {
|
||||
objArr[1] = "getErrors";
|
||||
}
|
||||
if (i != 4 && i != 5 && i != 6 && i != 7) {
|
||||
objArr[2] = "<init>";
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i != 4 && i != 5 && i != 6 && i != 7) {
|
||||
throw new IllegalArgumentException(format);
|
||||
}
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
|
||||
public PropagatedSignature(KotlinType kotlinType, KotlinType kotlinType2, List<ValueParameterDescriptor> list, List<TypeParameterDescriptor> list2, List<String> list3, boolean z3) {
|
||||
if (kotlinType == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (list2 == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (list3 == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
this.returnType = kotlinType;
|
||||
this.receiverType = kotlinType2;
|
||||
this.valueParameters = list;
|
||||
this.typeParameters = list2;
|
||||
this.signatureErrors = list3;
|
||||
this.hasStableParameterNames = z3;
|
||||
}
|
||||
|
||||
public List<String> getErrors() {
|
||||
List<String> list = this.signatureErrors;
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public KotlinType getReceiverType() {
|
||||
return this.receiverType;
|
||||
}
|
||||
|
||||
public KotlinType getReturnType() {
|
||||
KotlinType kotlinType = this.returnType;
|
||||
if (kotlinType == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
return kotlinType;
|
||||
}
|
||||
|
||||
public List<TypeParameterDescriptor> getTypeParameters() {
|
||||
List<TypeParameterDescriptor> list = this.typeParameters;
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<ValueParameterDescriptor> getValueParameters() {
|
||||
List<ValueParameterDescriptor> list = this.valueParameters;
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean hasStableParameterNames() {
|
||||
return this.hasStableParameterNames;
|
||||
}
|
||||
}
|
||||
|
||||
void reportSignatureErrors(CallableMemberDescriptor callableMemberDescriptor, List<String> list);
|
||||
|
||||
PropagatedSignature resolvePropagatedSignature(JavaMethod javaMethod, ClassDescriptor classDescriptor, KotlinType kotlinType, KotlinType kotlinType2, List<ValueParameterDescriptor> list, List<TypeParameterDescriptor> list2);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaCallableMemberDescriptor extends CallableMemberDescriptor {
|
||||
JavaCallableMemberDescriptor enhance(KotlinType kotlinType, List<KotlinType> list, KotlinType kotlinType2, Pair<CallableDescriptor.UserDataKey<?>, ?> pair);
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassConstructorDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class JavaClassConstructorDescriptor extends ClassConstructorDescriptorImpl implements JavaCallableMemberDescriptor {
|
||||
static final /* synthetic */ boolean $assertionsDisabled = false;
|
||||
private Boolean hasStableParameterNames;
|
||||
private Boolean hasSynthesizedParameterNames;
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = (i == 11 || i == 18) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
|
||||
Object[] objArr = new Object[(i == 11 || i == 18) ? 2 : 3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
case 5:
|
||||
case 9:
|
||||
case 15:
|
||||
objArr[0] = "annotations";
|
||||
break;
|
||||
case 2:
|
||||
case 8:
|
||||
case 13:
|
||||
objArr[0] = "kind";
|
||||
break;
|
||||
case 3:
|
||||
case 6:
|
||||
case 10:
|
||||
objArr[0] = "source";
|
||||
break;
|
||||
case 4:
|
||||
default:
|
||||
objArr[0] = "containingDeclaration";
|
||||
break;
|
||||
case 7:
|
||||
case 12:
|
||||
objArr[0] = "newOwner";
|
||||
break;
|
||||
case 11:
|
||||
case 18:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaClassConstructorDescriptor";
|
||||
break;
|
||||
case 14:
|
||||
objArr[0] = "sourceElement";
|
||||
break;
|
||||
case 16:
|
||||
objArr[0] = "enhancedValueParameterTypes";
|
||||
break;
|
||||
case 17:
|
||||
objArr[0] = "enhancedReturnType";
|
||||
break;
|
||||
}
|
||||
if (i == 11) {
|
||||
objArr[1] = "createSubstitutedCopy";
|
||||
} else if (i != 18) {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaClassConstructorDescriptor";
|
||||
} else {
|
||||
objArr[1] = "enhance";
|
||||
}
|
||||
switch (i) {
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
objArr[2] = "createJavaConstructor";
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
objArr[2] = "createSubstitutedCopy";
|
||||
break;
|
||||
case 11:
|
||||
case 18:
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
objArr[2] = "createDescriptor";
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
objArr[2] = "enhance";
|
||||
break;
|
||||
default:
|
||||
objArr[2] = "<init>";
|
||||
break;
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i != 11 && i != 18) {
|
||||
throw new IllegalArgumentException(format);
|
||||
}
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaClassConstructorDescriptor(ClassDescriptor classDescriptor, JavaClassConstructorDescriptor javaClassConstructorDescriptor, Annotations annotations, boolean z3, CallableMemberDescriptor.Kind kind, SourceElement sourceElement) {
|
||||
super(classDescriptor, javaClassConstructorDescriptor, annotations, z3, kind, sourceElement);
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
this.hasStableParameterNames = null;
|
||||
this.hasSynthesizedParameterNames = null;
|
||||
}
|
||||
|
||||
public static JavaClassConstructorDescriptor createJavaConstructor(ClassDescriptor classDescriptor, Annotations annotations, boolean z3, SourceElement sourceElement) {
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
return new JavaClassConstructorDescriptor(classDescriptor, null, annotations, z3, CallableMemberDescriptor.Kind.DECLARATION, sourceElement);
|
||||
}
|
||||
|
||||
public JavaClassConstructorDescriptor createDescriptor(ClassDescriptor classDescriptor, JavaClassConstructorDescriptor javaClassConstructorDescriptor, CallableMemberDescriptor.Kind kind, SourceElement sourceElement, Annotations annotations) {
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(12);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(13);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(14);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(15);
|
||||
}
|
||||
return new JavaClassConstructorDescriptor(classDescriptor, javaClassConstructorDescriptor, annotations, this.isPrimary, kind, sourceElement);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaCallableMemberDescriptor
|
||||
public /* bridge */ /* synthetic */ JavaCallableMemberDescriptor enhance(KotlinType kotlinType, List list, KotlinType kotlinType2, Pair pair) {
|
||||
return enhance(kotlinType, (List<KotlinType>) list, kotlinType2, (Pair<CallableDescriptor.UserDataKey<?>, ?>) pair);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public boolean hasStableParameterNames() {
|
||||
return this.hasStableParameterNames.booleanValue();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
public boolean hasSynthesizedParameterNames() {
|
||||
return this.hasSynthesizedParameterNames.booleanValue();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public void setHasStableParameterNames(boolean z3) {
|
||||
this.hasStableParameterNames = Boolean.valueOf(z3);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public void setHasSynthesizedParameterNames(boolean z3) {
|
||||
this.hasSynthesizedParameterNames = Boolean.valueOf(z3);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaCallableMemberDescriptor
|
||||
public JavaClassConstructorDescriptor enhance(KotlinType kotlinType, List<KotlinType> list, KotlinType kotlinType2, Pair<CallableDescriptor.UserDataKey<?>, ?> pair) {
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(16);
|
||||
}
|
||||
if (kotlinType2 == null) {
|
||||
$$$reportNull$$$0(17);
|
||||
}
|
||||
JavaClassConstructorDescriptor createSubstitutedCopy = createSubstitutedCopy((DeclarationDescriptor) getContainingDeclaration(), (FunctionDescriptor) null, getKind(), (Name) null, getAnnotations(), getSource());
|
||||
createSubstitutedCopy.initialize(kotlinType == null ? null : DescriptorFactory.createExtensionReceiverParameterForCallable(createSubstitutedCopy, kotlinType, Annotations.Companion.getEMPTY()), getDispatchReceiverParameter(), CollectionsKt.emptyList(), getTypeParameters(), UtilKt.copyValueParameters(list, getValueParameters(), createSubstitutedCopy), kotlinType2, getModality(), getVisibility());
|
||||
if (pair != null) {
|
||||
createSubstitutedCopy.putInUserDataMap(pair.getFirst(), pair.getSecond());
|
||||
}
|
||||
return createSubstitutedCopy;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassConstructorDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public JavaClassConstructorDescriptor createSubstitutedCopy(DeclarationDescriptor declarationDescriptor, FunctionDescriptor functionDescriptor, CallableMemberDescriptor.Kind kind, Name name, Annotations annotations, SourceElement sourceElement) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(9);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(10);
|
||||
}
|
||||
if (kind != CallableMemberDescriptor.Kind.DECLARATION && kind != CallableMemberDescriptor.Kind.SYNTHESIZED) {
|
||||
throw new IllegalStateException("Attempt at creating a constructor that is not a declaration: \ncopy from: " + this + "\nnewOwner: " + declarationDescriptor + "\nkind: " + kind);
|
||||
}
|
||||
JavaClassConstructorDescriptor createDescriptor = createDescriptor((ClassDescriptor) declarationDescriptor, (JavaClassConstructorDescriptor) functionDescriptor, kind, sourceElement, annotations);
|
||||
createDescriptor.setHasStableParameterNames(hasStableParameterNames());
|
||||
createDescriptor.setHasSynthesizedParameterNames(hasSynthesizedParameterNames());
|
||||
return createDescriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClassDescriptor extends ClassDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaForKotlinOverridePropertyDescriptor extends JavaPropertyDescriptor {
|
||||
private final SimpleFunctionDescriptor getterMethod;
|
||||
private final PropertyDescriptor overriddenProperty;
|
||||
private final SimpleFunctionDescriptor setterMethod;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaForKotlinOverridePropertyDescriptor(ClassDescriptor ownerDescriptor, SimpleFunctionDescriptor getterMethod, SimpleFunctionDescriptor simpleFunctionDescriptor, PropertyDescriptor overriddenProperty) {
|
||||
super(ownerDescriptor, Annotations.Companion.getEMPTY(), getterMethod.getModality(), getterMethod.getVisibility(), simpleFunctionDescriptor != null, overriddenProperty.getName(), getterMethod.getSource(), null, CallableMemberDescriptor.Kind.DECLARATION, false, null);
|
||||
Intrinsics.checkNotNullParameter(ownerDescriptor, "ownerDescriptor");
|
||||
Intrinsics.checkNotNullParameter(getterMethod, "getterMethod");
|
||||
Intrinsics.checkNotNullParameter(overriddenProperty, "overriddenProperty");
|
||||
this.getterMethod = getterMethod;
|
||||
this.setterMethod = simpleFunctionDescriptor;
|
||||
this.overriddenProperty = overriddenProperty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.Pair;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.util.OperatorChecks;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class JavaMethodDescriptor extends SimpleFunctionDescriptorImpl implements JavaCallableMemberDescriptor {
|
||||
static final /* synthetic */ boolean $assertionsDisabled = false;
|
||||
private final boolean isForRecordComponent;
|
||||
private ParameterNamesStatus parameterNamesStatus;
|
||||
public static final CallableDescriptor.UserDataKey<ValueParameterDescriptor> ORIGINAL_VALUE_PARAMETER_FOR_EXTENSION_RECEIVER = new CallableDescriptor.UserDataKey<ValueParameterDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor.1
|
||||
};
|
||||
public static final CallableDescriptor.UserDataKey<Boolean> HAS_ERASED_VALUE_PARAMETERS = new CallableDescriptor.UserDataKey<Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor.2
|
||||
};
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum ParameterNamesStatus {
|
||||
NON_STABLE_DECLARED(false, false),
|
||||
STABLE_DECLARED(true, false),
|
||||
NON_STABLE_SYNTHESIZED(false, true),
|
||||
STABLE_SYNTHESIZED(true, true);
|
||||
|
||||
public final boolean isStable;
|
||||
public final boolean isSynthesized;
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
throw new IllegalStateException("@NotNull method kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaMethodDescriptor$ParameterNamesStatus.get must not return null");
|
||||
}
|
||||
|
||||
ParameterNamesStatus(boolean z3, boolean z4) {
|
||||
this.isStable = z3;
|
||||
this.isSynthesized = z4;
|
||||
}
|
||||
|
||||
public static ParameterNamesStatus get(boolean z3, boolean z4) {
|
||||
ParameterNamesStatus parameterNamesStatus = z3 ? z4 ? STABLE_SYNTHESIZED : STABLE_DECLARED : z4 ? NON_STABLE_SYNTHESIZED : NON_STABLE_DECLARED;
|
||||
if (parameterNamesStatus == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
return parameterNamesStatus;
|
||||
}
|
||||
}
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = (i == 13 || i == 18 || i == 21) ? "@NotNull method %s.%s must not return null" : "Argument for @NotNull parameter '%s' of %s.%s must not be null";
|
||||
Object[] objArr = new Object[(i == 13 || i == 18 || i == 21) ? 2 : 3];
|
||||
switch (i) {
|
||||
case 1:
|
||||
case 6:
|
||||
case 16:
|
||||
objArr[0] = "annotations";
|
||||
break;
|
||||
case 2:
|
||||
case 7:
|
||||
objArr[0] = AppMeasurementSdk.ConditionalUserProperty.NAME;
|
||||
break;
|
||||
case 3:
|
||||
case 15:
|
||||
objArr[0] = "kind";
|
||||
break;
|
||||
case 4:
|
||||
case 8:
|
||||
case 17:
|
||||
objArr[0] = "source";
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
objArr[0] = "containingDeclaration";
|
||||
break;
|
||||
case 9:
|
||||
objArr[0] = "contextReceiverParameters";
|
||||
break;
|
||||
case 10:
|
||||
objArr[0] = "typeParameters";
|
||||
break;
|
||||
case 11:
|
||||
objArr[0] = "unsubstitutedValueParameters";
|
||||
break;
|
||||
case 12:
|
||||
objArr[0] = "visibility";
|
||||
break;
|
||||
case 13:
|
||||
case 18:
|
||||
case 21:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaMethodDescriptor";
|
||||
break;
|
||||
case 14:
|
||||
objArr[0] = "newOwner";
|
||||
break;
|
||||
case 19:
|
||||
objArr[0] = "enhancedValueParameterTypes";
|
||||
break;
|
||||
case 20:
|
||||
objArr[0] = "enhancedReturnType";
|
||||
break;
|
||||
}
|
||||
if (i == 13) {
|
||||
objArr[1] = "initialize";
|
||||
} else if (i == 18) {
|
||||
objArr[1] = "createSubstitutedCopy";
|
||||
} else if (i != 21) {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaMethodDescriptor";
|
||||
} else {
|
||||
objArr[1] = "enhance";
|
||||
}
|
||||
switch (i) {
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
objArr[2] = "createJavaMethod";
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
objArr[2] = "initialize";
|
||||
break;
|
||||
case 13:
|
||||
case 18:
|
||||
case 21:
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
objArr[2] = "createSubstitutedCopy";
|
||||
break;
|
||||
case 19:
|
||||
case 20:
|
||||
objArr[2] = "enhance";
|
||||
break;
|
||||
default:
|
||||
objArr[2] = "<init>";
|
||||
break;
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i != 13 && i != 18 && i != 21) {
|
||||
throw new IllegalArgumentException(format);
|
||||
}
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaMethodDescriptor(DeclarationDescriptor declarationDescriptor, SimpleFunctionDescriptor simpleFunctionDescriptor, Annotations annotations, Name name, CallableMemberDescriptor.Kind kind, SourceElement sourceElement, boolean z3) {
|
||||
super(declarationDescriptor, simpleFunctionDescriptor, annotations, name, kind, sourceElement);
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
this.parameterNamesStatus = null;
|
||||
this.isForRecordComponent = z3;
|
||||
}
|
||||
|
||||
public static JavaMethodDescriptor createJavaMethod(DeclarationDescriptor declarationDescriptor, Annotations annotations, Name name, SourceElement sourceElement, boolean z3) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
return new JavaMethodDescriptor(declarationDescriptor, null, annotations, name, CallableMemberDescriptor.Kind.DECLARATION, sourceElement, z3);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaCallableMemberDescriptor
|
||||
public /* bridge */ /* synthetic */ JavaCallableMemberDescriptor enhance(KotlinType kotlinType, List list, KotlinType kotlinType2, Pair pair) {
|
||||
return enhance(kotlinType, (List<KotlinType>) list, kotlinType2, (Pair<CallableDescriptor.UserDataKey<?>, ?>) pair);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public boolean hasStableParameterNames() {
|
||||
return this.parameterNamesStatus.isStable;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
public boolean hasSynthesizedParameterNames() {
|
||||
return this.parameterNamesStatus.isSynthesized;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl
|
||||
public SimpleFunctionDescriptorImpl initialize(ReceiverParameterDescriptor receiverParameterDescriptor, ReceiverParameterDescriptor receiverParameterDescriptor2, List<ReceiverParameterDescriptor> list, List<? extends TypeParameterDescriptor> list2, List<ValueParameterDescriptor> list3, KotlinType kotlinType, Modality modality, DescriptorVisibility descriptorVisibility, Map<? extends CallableDescriptor.UserDataKey<?>, ?> map) {
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(9);
|
||||
}
|
||||
if (list2 == null) {
|
||||
$$$reportNull$$$0(10);
|
||||
}
|
||||
if (list3 == null) {
|
||||
$$$reportNull$$$0(11);
|
||||
}
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(12);
|
||||
}
|
||||
SimpleFunctionDescriptorImpl initialize = super.initialize(receiverParameterDescriptor, receiverParameterDescriptor2, list, list2, list3, kotlinType, modality, descriptorVisibility, map);
|
||||
setOperator(OperatorChecks.INSTANCE.check(initialize).isSuccess());
|
||||
if (initialize == null) {
|
||||
$$$reportNull$$$0(13);
|
||||
}
|
||||
return initialize;
|
||||
}
|
||||
|
||||
public void setParameterNamesStatus(boolean z3, boolean z4) {
|
||||
this.parameterNamesStatus = ParameterNamesStatus.get(z3, z4);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
|
||||
public JavaMethodDescriptor createSubstitutedCopy(DeclarationDescriptor declarationDescriptor, FunctionDescriptor functionDescriptor, CallableMemberDescriptor.Kind kind, Name name, Annotations annotations, SourceElement sourceElement) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(14);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(15);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(16);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(17);
|
||||
}
|
||||
SimpleFunctionDescriptor simpleFunctionDescriptor = (SimpleFunctionDescriptor) functionDescriptor;
|
||||
if (name == null) {
|
||||
name = getName();
|
||||
}
|
||||
JavaMethodDescriptor javaMethodDescriptor = new JavaMethodDescriptor(declarationDescriptor, simpleFunctionDescriptor, annotations, name, kind, sourceElement, this.isForRecordComponent);
|
||||
javaMethodDescriptor.setParameterNamesStatus(hasStableParameterNames(), hasSynthesizedParameterNames());
|
||||
return javaMethodDescriptor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaCallableMemberDescriptor
|
||||
public JavaMethodDescriptor enhance(KotlinType kotlinType, List<KotlinType> list, KotlinType kotlinType2, Pair<CallableDescriptor.UserDataKey<?>, ?> pair) {
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(19);
|
||||
}
|
||||
if (kotlinType2 == null) {
|
||||
$$$reportNull$$$0(20);
|
||||
}
|
||||
JavaMethodDescriptor javaMethodDescriptor = (JavaMethodDescriptor) newCopyBuilder().setValueParameters(UtilKt.copyValueParameters(list, getValueParameters(), this)).setReturnType(kotlinType2).setExtensionReceiverParameter(kotlinType == null ? null : DescriptorFactory.createExtensionReceiverParameterForCallable(this, kotlinType, Annotations.Companion.getEMPTY())).setDropOriginalInContainingParts().setPreserveSourceElement().build();
|
||||
if (pair != null) {
|
||||
javaMethodDescriptor.putInUserDataMap(pair.getFirst(), pair.getSecond());
|
||||
}
|
||||
if (javaMethodDescriptor == null) {
|
||||
$$$reportNull$$$0(21);
|
||||
}
|
||||
return javaMethodDescriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ConstUtil;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertySetterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyGetterDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertySetterDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.TypeEnhancementKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NullableLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class JavaPropertyDescriptor extends PropertyDescriptorImpl implements JavaCallableMemberDescriptor {
|
||||
private KotlinType inType;
|
||||
private final boolean isStaticFinal;
|
||||
private final Pair<CallableDescriptor.UserDataKey<?>, ?> singleUserData;
|
||||
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
String str = i != 21 ? "Argument for @NotNull parameter '%s' of %s.%s must not be null" : "@NotNull method %s.%s must not return null";
|
||||
Object[] objArr = new Object[i != 21 ? 3 : 2];
|
||||
switch (i) {
|
||||
case 1:
|
||||
case 8:
|
||||
objArr[0] = "annotations";
|
||||
break;
|
||||
case 2:
|
||||
case 9:
|
||||
objArr[0] = "modality";
|
||||
break;
|
||||
case 3:
|
||||
case 10:
|
||||
objArr[0] = "visibility";
|
||||
break;
|
||||
case 4:
|
||||
case 11:
|
||||
objArr[0] = AppMeasurementSdk.ConditionalUserProperty.NAME;
|
||||
break;
|
||||
case 5:
|
||||
case 12:
|
||||
case 18:
|
||||
objArr[0] = "source";
|
||||
break;
|
||||
case 6:
|
||||
case 16:
|
||||
objArr[0] = "kind";
|
||||
break;
|
||||
case 7:
|
||||
default:
|
||||
objArr[0] = "containingDeclaration";
|
||||
break;
|
||||
case 13:
|
||||
objArr[0] = "newOwner";
|
||||
break;
|
||||
case 14:
|
||||
objArr[0] = "newModality";
|
||||
break;
|
||||
case 15:
|
||||
objArr[0] = "newVisibility";
|
||||
break;
|
||||
case 17:
|
||||
objArr[0] = "newName";
|
||||
break;
|
||||
case 19:
|
||||
objArr[0] = "enhancedValueParameterTypes";
|
||||
break;
|
||||
case 20:
|
||||
objArr[0] = "enhancedReturnType";
|
||||
break;
|
||||
case 21:
|
||||
objArr[0] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaPropertyDescriptor";
|
||||
break;
|
||||
case 22:
|
||||
objArr[0] = "inType";
|
||||
break;
|
||||
}
|
||||
if (i != 21) {
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/load/java/descriptors/JavaPropertyDescriptor";
|
||||
} else {
|
||||
objArr[1] = "enhance";
|
||||
}
|
||||
switch (i) {
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
objArr[2] = "create";
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
objArr[2] = "createSubstitutedCopy";
|
||||
break;
|
||||
case 19:
|
||||
case 20:
|
||||
objArr[2] = "enhance";
|
||||
break;
|
||||
case 21:
|
||||
break;
|
||||
case 22:
|
||||
objArr[2] = "setInType";
|
||||
break;
|
||||
default:
|
||||
objArr[2] = "<init>";
|
||||
break;
|
||||
}
|
||||
String format = String.format(str, objArr);
|
||||
if (i == 21) {
|
||||
throw new IllegalStateException(format);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public JavaPropertyDescriptor(DeclarationDescriptor declarationDescriptor, Annotations annotations, Modality modality, DescriptorVisibility descriptorVisibility, boolean z3, Name name, SourceElement sourceElement, PropertyDescriptor propertyDescriptor, CallableMemberDescriptor.Kind kind, boolean z4, Pair<CallableDescriptor.UserDataKey<?>, ?> pair) {
|
||||
super(declarationDescriptor, propertyDescriptor, annotations, modality, descriptorVisibility, z3, name, kind, sourceElement, false, false, false, false, false, false);
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (modality == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(4);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(5);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
this.inType = null;
|
||||
this.isStaticFinal = z4;
|
||||
this.singleUserData = pair;
|
||||
}
|
||||
|
||||
public static JavaPropertyDescriptor create(DeclarationDescriptor declarationDescriptor, Annotations annotations, Modality modality, DescriptorVisibility descriptorVisibility, boolean z3, Name name, SourceElement sourceElement, boolean z4) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
if (annotations == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
if (modality == null) {
|
||||
$$$reportNull$$$0(9);
|
||||
}
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(10);
|
||||
}
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(11);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(12);
|
||||
}
|
||||
return new JavaPropertyDescriptor(declarationDescriptor, annotations, modality, descriptorVisibility, z3, name, sourceElement, null, CallableMemberDescriptor.Kind.DECLARATION, z4, null);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl
|
||||
public PropertyDescriptorImpl createSubstitutedCopy(DeclarationDescriptor declarationDescriptor, Modality modality, DescriptorVisibility descriptorVisibility, PropertyDescriptor propertyDescriptor, CallableMemberDescriptor.Kind kind, Name name, SourceElement sourceElement) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(13);
|
||||
}
|
||||
if (modality == null) {
|
||||
$$$reportNull$$$0(14);
|
||||
}
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(15);
|
||||
}
|
||||
if (kind == null) {
|
||||
$$$reportNull$$$0(16);
|
||||
}
|
||||
if (name == null) {
|
||||
$$$reportNull$$$0(17);
|
||||
}
|
||||
if (sourceElement == null) {
|
||||
$$$reportNull$$$0(18);
|
||||
}
|
||||
return new JavaPropertyDescriptor(declarationDescriptor, getAnnotations(), modality, descriptorVisibility, isVar(), name, sourceElement, propertyDescriptor, kind, this.isStaticFinal, this.singleUserData);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaCallableMemberDescriptor
|
||||
public JavaCallableMemberDescriptor enhance(KotlinType kotlinType, List<KotlinType> list, KotlinType kotlinType2, Pair<CallableDescriptor.UserDataKey<?>, ?> pair) {
|
||||
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl;
|
||||
PropertySetterDescriptorImpl propertySetterDescriptorImpl;
|
||||
if (list == null) {
|
||||
$$$reportNull$$$0(19);
|
||||
}
|
||||
if (kotlinType2 == null) {
|
||||
$$$reportNull$$$0(20);
|
||||
}
|
||||
PropertyDescriptor original = getOriginal() == this ? null : getOriginal();
|
||||
JavaPropertyDescriptor javaPropertyDescriptor = new JavaPropertyDescriptor(getContainingDeclaration(), getAnnotations(), getModality(), getVisibility(), isVar(), getName(), getSource(), original, getKind(), this.isStaticFinal, pair);
|
||||
PropertyGetterDescriptorImpl getter = getGetter();
|
||||
if (getter != null) {
|
||||
PropertyGetterDescriptorImpl propertyGetterDescriptorImpl2 = new PropertyGetterDescriptorImpl(javaPropertyDescriptor, getter.getAnnotations(), getter.getModality(), getter.getVisibility(), getter.isDefault(), getter.isExternal(), getter.isInline(), getKind(), original == null ? null : original.getGetter(), getter.getSource());
|
||||
propertyGetterDescriptorImpl2.setInitialSignatureDescriptor(getter.getInitialSignatureDescriptor());
|
||||
propertyGetterDescriptorImpl2.initialize(kotlinType2);
|
||||
propertyGetterDescriptorImpl = propertyGetterDescriptorImpl2;
|
||||
} else {
|
||||
propertyGetterDescriptorImpl = null;
|
||||
}
|
||||
PropertySetterDescriptor setter = getSetter();
|
||||
if (setter != null) {
|
||||
propertySetterDescriptorImpl = new PropertySetterDescriptorImpl(javaPropertyDescriptor, setter.getAnnotations(), setter.getModality(), setter.getVisibility(), setter.isDefault(), setter.isExternal(), setter.isInline(), getKind(), original == null ? null : original.getSetter(), setter.getSource());
|
||||
propertySetterDescriptorImpl.setInitialSignatureDescriptor(propertySetterDescriptorImpl.getInitialSignatureDescriptor());
|
||||
propertySetterDescriptorImpl.initialize(setter.getValueParameters().get(0));
|
||||
} else {
|
||||
propertySetterDescriptorImpl = null;
|
||||
}
|
||||
javaPropertyDescriptor.initialize(propertyGetterDescriptorImpl, propertySetterDescriptorImpl, getBackingField(), getDelegateField());
|
||||
javaPropertyDescriptor.setSetterProjectedOut(isSetterProjectedOut());
|
||||
Function0<NullableLazyValue<ConstantValue<?>>> function0 = this.compileTimeInitializerFactory;
|
||||
if (function0 != null) {
|
||||
javaPropertyDescriptor.setCompileTimeInitializer(this.compileTimeInitializer, function0);
|
||||
}
|
||||
javaPropertyDescriptor.setOverriddenDescriptors(getOverriddenDescriptors());
|
||||
javaPropertyDescriptor.setType(kotlinType2, getTypeParameters(), getDispatchReceiverParameter(), kotlinType != null ? DescriptorFactory.createExtensionReceiverParameterForCallable(this, kotlinType, Annotations.Companion.getEMPTY()) : null, CollectionsKt.emptyList());
|
||||
return javaPropertyDescriptor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.VariableDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
public <V> V getUserData(CallableDescriptor.UserDataKey<V> userDataKey) {
|
||||
Pair<CallableDescriptor.UserDataKey<?>, ?> pair = this.singleUserData;
|
||||
if (pair == null || !pair.getFirst().equals(userDataKey)) {
|
||||
return null;
|
||||
}
|
||||
return (V) this.singleUserData.getSecond();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.VariableDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
public boolean hasSynthesizedParameterNames() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.VariableDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.VariableDescriptor
|
||||
public boolean isConst() {
|
||||
KotlinType type = getType();
|
||||
if (this.isStaticFinal && ConstUtil.canBeUsedForConstVal(type)) {
|
||||
return !TypeEnhancementKt.hasEnhancedNullability(type) || KotlinBuiltIns.isString(type);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl
|
||||
public void setInType(KotlinType kotlinType) {
|
||||
if (kotlinType == null) {
|
||||
$$$reportNull$$$0(22);
|
||||
}
|
||||
this.inType = kotlinType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PossiblyExternalAnnotationDescriptor extends AnnotationDescriptor {
|
||||
boolean isIdeExternalAnnotation();
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nutil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 util.kt\norg/jetbrains/kotlin/load/java/descriptors/UtilKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,68:1\n1549#2:69\n1620#2,3:70\n*S KotlinDebug\n*F\n+ 1 util.kt\norg/jetbrains/kotlin/load/java/descriptors/UtilKt\n*L\n40#1:69\n40#1:70,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class UtilKt {
|
||||
public static final List<ValueParameterDescriptor> copyValueParameters(Collection<? extends KotlinType> newValueParameterTypes, Collection<? extends ValueParameterDescriptor> oldValueParameters, CallableDescriptor callableDescriptor) {
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(newValueParameterTypes, "newValueParameterTypes");
|
||||
Intrinsics.checkNotNullParameter(oldValueParameters, "oldValueParameters");
|
||||
CallableDescriptor newOwner = callableDescriptor;
|
||||
Intrinsics.checkNotNullParameter(newOwner, "newOwner");
|
||||
newValueParameterTypes.size();
|
||||
oldValueParameters.size();
|
||||
List<Pair> zip = CollectionsKt.zip(newValueParameterTypes, oldValueParameters);
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(zip, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (Pair pair : zip) {
|
||||
KotlinType kotlinType = (KotlinType) pair.component1();
|
||||
ValueParameterDescriptor valueParameterDescriptor = (ValueParameterDescriptor) pair.component2();
|
||||
int index = valueParameterDescriptor.getIndex();
|
||||
Annotations annotations = valueParameterDescriptor.getAnnotations();
|
||||
Name name = valueParameterDescriptor.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
boolean declaresDefaultValue = valueParameterDescriptor.declaresDefaultValue();
|
||||
boolean isCrossinline = valueParameterDescriptor.isCrossinline();
|
||||
boolean isNoinline = valueParameterDescriptor.isNoinline();
|
||||
KotlinType arrayElementType = valueParameterDescriptor.getVarargElementType() != null ? DescriptorUtilsKt.getModule(newOwner).getBuiltIns().getArrayElementType(kotlinType) : null;
|
||||
SourceElement source = valueParameterDescriptor.getSource();
|
||||
Intrinsics.checkNotNullExpressionValue(source, "getSource(...)");
|
||||
arrayList.add(new ValueParameterDescriptorImpl(newOwner, null, index, annotations, name, kotlinType, declaresDefaultValue, isCrossinline, isNoinline, arrayElementType, source));
|
||||
newOwner = callableDescriptor;
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public static final LazyJavaStaticClassScope getParentJavaStaticClassScope(ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(classDescriptor, "<this>");
|
||||
ClassDescriptor superClassNotAny = DescriptorUtilsKt.getSuperClassNotAny(classDescriptor);
|
||||
if (superClassNotAny == null) {
|
||||
return null;
|
||||
}
|
||||
MemberScope staticScope = superClassNotAny.getStaticScope();
|
||||
LazyJavaStaticClassScope lazyJavaStaticClassScope = staticScope instanceof LazyJavaStaticClassScope ? (LazyJavaStaticClassScope) staticScope : null;
|
||||
return lazyJavaStaticClassScope == null ? getParentJavaStaticClassScope(superClassNotAny) : lazyJavaStaticClassScope;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.Lazy;
|
||||
import kotlin.LazyKt;
|
||||
import kotlin.LazyThreadSafetyMode;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassOrPackageFragmentDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaTypeQualifiersByElementType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameterListOwner;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ContextKt {
|
||||
public static final LazyJavaResolverContext child(LazyJavaResolverContext lazyJavaResolverContext, TypeParameterResolver typeParameterResolver) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(typeParameterResolver, "typeParameterResolver");
|
||||
return new LazyJavaResolverContext(lazyJavaResolverContext.getComponents(), typeParameterResolver, lazyJavaResolverContext.getDelegateForDefaultTypeQualifiers$descriptors_jvm());
|
||||
}
|
||||
|
||||
public static final LazyJavaResolverContext childForClassOrPackage(final LazyJavaResolverContext lazyJavaResolverContext, final ClassOrPackageFragmentDescriptor containingDeclaration, JavaTypeParameterListOwner javaTypeParameterListOwner, int i) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
|
||||
return child(lazyJavaResolverContext, containingDeclaration, javaTypeParameterListOwner, i, LazyKt.lazy(LazyThreadSafetyMode.NONE, (Function0) new Function0<JavaTypeQualifiersByElementType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.ContextKt$childForClassOrPackage$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final JavaTypeQualifiersByElementType invoke() {
|
||||
return ContextKt.computeNewDefaultTypeQualifiers(LazyJavaResolverContext.this, containingDeclaration.getAnnotations());
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public static /* synthetic */ LazyJavaResolverContext childForClassOrPackage$default(LazyJavaResolverContext lazyJavaResolverContext, ClassOrPackageFragmentDescriptor classOrPackageFragmentDescriptor, JavaTypeParameterListOwner javaTypeParameterListOwner, int i, int i4, Object obj) {
|
||||
if ((i4 & 2) != 0) {
|
||||
javaTypeParameterListOwner = null;
|
||||
}
|
||||
if ((i4 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
return childForClassOrPackage(lazyJavaResolverContext, classOrPackageFragmentDescriptor, javaTypeParameterListOwner, i);
|
||||
}
|
||||
|
||||
public static final LazyJavaResolverContext childForMethod(LazyJavaResolverContext lazyJavaResolverContext, DeclarationDescriptor containingDeclaration, JavaTypeParameterListOwner typeParameterOwner, int i) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
|
||||
Intrinsics.checkNotNullParameter(typeParameterOwner, "typeParameterOwner");
|
||||
return child(lazyJavaResolverContext, containingDeclaration, typeParameterOwner, i, lazyJavaResolverContext.getDelegateForDefaultTypeQualifiers$descriptors_jvm());
|
||||
}
|
||||
|
||||
public static /* synthetic */ LazyJavaResolverContext childForMethod$default(LazyJavaResolverContext lazyJavaResolverContext, DeclarationDescriptor declarationDescriptor, JavaTypeParameterListOwner javaTypeParameterListOwner, int i, int i4, Object obj) {
|
||||
if ((i4 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
return childForMethod(lazyJavaResolverContext, declarationDescriptor, javaTypeParameterListOwner, i);
|
||||
}
|
||||
|
||||
public static final JavaTypeQualifiersByElementType computeNewDefaultTypeQualifiers(LazyJavaResolverContext lazyJavaResolverContext, Annotations additionalAnnotations) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(additionalAnnotations, "additionalAnnotations");
|
||||
return lazyJavaResolverContext.getComponents().getAnnotationTypeQualifierResolver().extractAndMergeDefaultQualifiers(lazyJavaResolverContext.getDefaultTypeQualifiers(), additionalAnnotations);
|
||||
}
|
||||
|
||||
public static final LazyJavaResolverContext copyWithNewDefaultTypeQualifiers(final LazyJavaResolverContext lazyJavaResolverContext, final Annotations additionalAnnotations) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(additionalAnnotations, "additionalAnnotations");
|
||||
return additionalAnnotations.isEmpty() ? lazyJavaResolverContext : new LazyJavaResolverContext(lazyJavaResolverContext.getComponents(), lazyJavaResolverContext.getTypeParameterResolver(), LazyKt.lazy(LazyThreadSafetyMode.NONE, (Function0) new Function0<JavaTypeQualifiersByElementType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.ContextKt$copyWithNewDefaultTypeQualifiers$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final JavaTypeQualifiersByElementType invoke() {
|
||||
return ContextKt.computeNewDefaultTypeQualifiers(LazyJavaResolverContext.this, additionalAnnotations);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public static final LazyJavaResolverContext replaceComponents(LazyJavaResolverContext lazyJavaResolverContext, JavaResolverComponents components) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(components, "components");
|
||||
return new LazyJavaResolverContext(components, lazyJavaResolverContext.getTypeParameterResolver(), lazyJavaResolverContext.getDelegateForDefaultTypeQualifiers$descriptors_jvm());
|
||||
}
|
||||
|
||||
private static final LazyJavaResolverContext child(LazyJavaResolverContext lazyJavaResolverContext, DeclarationDescriptor declarationDescriptor, JavaTypeParameterListOwner javaTypeParameterListOwner, int i, Lazy<JavaTypeQualifiersByElementType> lazy) {
|
||||
TypeParameterResolver typeParameterResolver;
|
||||
JavaResolverComponents components = lazyJavaResolverContext.getComponents();
|
||||
if (javaTypeParameterListOwner != null) {
|
||||
typeParameterResolver = new LazyJavaTypeParameterResolver(lazyJavaResolverContext, declarationDescriptor, javaTypeParameterListOwner, i);
|
||||
} else {
|
||||
typeParameterResolver = lazyJavaResolverContext.getTypeParameterResolver();
|
||||
}
|
||||
return new LazyJavaResolverContext(components, typeParameterResolver, lazy);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.ReflectionTypes;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SupertypeLoopChecker;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupTracker;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.AnnotationTypeQualifierResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaClassFinder;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaClassesTracker;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaModuleAnnotationsProvider;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaTypeEnhancementState;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaPropertyInitializerEvaluator;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.SignaturePropagator;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.sources.JavaSourceElementFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement.SignatureEnhancement;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.DeserializedDescriptorResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.PackagePartProvider;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.jvm.SyntheticJavaPartsProvider;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.sam.SamConversionResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ErrorReporter;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.NewKotlinTypeChecker;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaResolverComponents {
|
||||
private final AnnotationTypeQualifierResolver annotationTypeQualifierResolver;
|
||||
private final DeserializedDescriptorResolver deserializedDescriptorResolver;
|
||||
private final ErrorReporter errorReporter;
|
||||
private final JavaClassFinder finder;
|
||||
private final JavaClassesTracker javaClassesTracker;
|
||||
private final JavaModuleAnnotationsProvider javaModuleResolver;
|
||||
private final JavaPropertyInitializerEvaluator javaPropertyInitializerEvaluator;
|
||||
private final JavaResolverCache javaResolverCache;
|
||||
private final JavaTypeEnhancementState javaTypeEnhancementState;
|
||||
private final KotlinClassFinder kotlinClassFinder;
|
||||
private final NewKotlinTypeChecker kotlinTypeChecker;
|
||||
private final LookupTracker lookupTracker;
|
||||
private final ModuleDescriptor module;
|
||||
private final ModuleClassResolver moduleClassResolver;
|
||||
private final PackagePartProvider packagePartProvider;
|
||||
private final ReflectionTypes reflectionTypes;
|
||||
private final SamConversionResolver samConversionResolver;
|
||||
private final JavaResolverSettings settings;
|
||||
private final SignatureEnhancement signatureEnhancement;
|
||||
private final SignaturePropagator signaturePropagator;
|
||||
private final JavaSourceElementFactory sourceElementFactory;
|
||||
private final StorageManager storageManager;
|
||||
private final SupertypeLoopChecker supertypeLoopChecker;
|
||||
private final SyntheticJavaPartsProvider syntheticPartsProvider;
|
||||
|
||||
public JavaResolverComponents(StorageManager storageManager, JavaClassFinder finder, KotlinClassFinder kotlinClassFinder, DeserializedDescriptorResolver deserializedDescriptorResolver, SignaturePropagator signaturePropagator, ErrorReporter errorReporter, JavaResolverCache javaResolverCache, JavaPropertyInitializerEvaluator javaPropertyInitializerEvaluator, SamConversionResolver samConversionResolver, JavaSourceElementFactory sourceElementFactory, ModuleClassResolver moduleClassResolver, PackagePartProvider packagePartProvider, SupertypeLoopChecker supertypeLoopChecker, LookupTracker lookupTracker, ModuleDescriptor module, ReflectionTypes reflectionTypes, AnnotationTypeQualifierResolver annotationTypeQualifierResolver, SignatureEnhancement signatureEnhancement, JavaClassesTracker javaClassesTracker, JavaResolverSettings settings, NewKotlinTypeChecker kotlinTypeChecker, JavaTypeEnhancementState javaTypeEnhancementState, JavaModuleAnnotationsProvider javaModuleResolver, SyntheticJavaPartsProvider syntheticPartsProvider) {
|
||||
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
|
||||
Intrinsics.checkNotNullParameter(finder, "finder");
|
||||
Intrinsics.checkNotNullParameter(kotlinClassFinder, "kotlinClassFinder");
|
||||
Intrinsics.checkNotNullParameter(deserializedDescriptorResolver, "deserializedDescriptorResolver");
|
||||
Intrinsics.checkNotNullParameter(signaturePropagator, "signaturePropagator");
|
||||
Intrinsics.checkNotNullParameter(errorReporter, "errorReporter");
|
||||
Intrinsics.checkNotNullParameter(javaResolverCache, "javaResolverCache");
|
||||
Intrinsics.checkNotNullParameter(javaPropertyInitializerEvaluator, "javaPropertyInitializerEvaluator");
|
||||
Intrinsics.checkNotNullParameter(samConversionResolver, "samConversionResolver");
|
||||
Intrinsics.checkNotNullParameter(sourceElementFactory, "sourceElementFactory");
|
||||
Intrinsics.checkNotNullParameter(moduleClassResolver, "moduleClassResolver");
|
||||
Intrinsics.checkNotNullParameter(packagePartProvider, "packagePartProvider");
|
||||
Intrinsics.checkNotNullParameter(supertypeLoopChecker, "supertypeLoopChecker");
|
||||
Intrinsics.checkNotNullParameter(lookupTracker, "lookupTracker");
|
||||
Intrinsics.checkNotNullParameter(module, "module");
|
||||
Intrinsics.checkNotNullParameter(reflectionTypes, "reflectionTypes");
|
||||
Intrinsics.checkNotNullParameter(annotationTypeQualifierResolver, "annotationTypeQualifierResolver");
|
||||
Intrinsics.checkNotNullParameter(signatureEnhancement, "signatureEnhancement");
|
||||
Intrinsics.checkNotNullParameter(javaClassesTracker, "javaClassesTracker");
|
||||
Intrinsics.checkNotNullParameter(settings, "settings");
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeChecker, "kotlinTypeChecker");
|
||||
Intrinsics.checkNotNullParameter(javaTypeEnhancementState, "javaTypeEnhancementState");
|
||||
Intrinsics.checkNotNullParameter(javaModuleResolver, "javaModuleResolver");
|
||||
Intrinsics.checkNotNullParameter(syntheticPartsProvider, "syntheticPartsProvider");
|
||||
this.storageManager = storageManager;
|
||||
this.finder = finder;
|
||||
this.kotlinClassFinder = kotlinClassFinder;
|
||||
this.deserializedDescriptorResolver = deserializedDescriptorResolver;
|
||||
this.signaturePropagator = signaturePropagator;
|
||||
this.errorReporter = errorReporter;
|
||||
this.javaResolverCache = javaResolverCache;
|
||||
this.javaPropertyInitializerEvaluator = javaPropertyInitializerEvaluator;
|
||||
this.samConversionResolver = samConversionResolver;
|
||||
this.sourceElementFactory = sourceElementFactory;
|
||||
this.moduleClassResolver = moduleClassResolver;
|
||||
this.packagePartProvider = packagePartProvider;
|
||||
this.supertypeLoopChecker = supertypeLoopChecker;
|
||||
this.lookupTracker = lookupTracker;
|
||||
this.module = module;
|
||||
this.reflectionTypes = reflectionTypes;
|
||||
this.annotationTypeQualifierResolver = annotationTypeQualifierResolver;
|
||||
this.signatureEnhancement = signatureEnhancement;
|
||||
this.javaClassesTracker = javaClassesTracker;
|
||||
this.settings = settings;
|
||||
this.kotlinTypeChecker = kotlinTypeChecker;
|
||||
this.javaTypeEnhancementState = javaTypeEnhancementState;
|
||||
this.javaModuleResolver = javaModuleResolver;
|
||||
this.syntheticPartsProvider = syntheticPartsProvider;
|
||||
}
|
||||
|
||||
public final AnnotationTypeQualifierResolver getAnnotationTypeQualifierResolver() {
|
||||
return this.annotationTypeQualifierResolver;
|
||||
}
|
||||
|
||||
public final DeserializedDescriptorResolver getDeserializedDescriptorResolver() {
|
||||
return this.deserializedDescriptorResolver;
|
||||
}
|
||||
|
||||
public final ErrorReporter getErrorReporter() {
|
||||
return this.errorReporter;
|
||||
}
|
||||
|
||||
public final JavaClassFinder getFinder() {
|
||||
return this.finder;
|
||||
}
|
||||
|
||||
public final JavaClassesTracker getJavaClassesTracker() {
|
||||
return this.javaClassesTracker;
|
||||
}
|
||||
|
||||
public final JavaModuleAnnotationsProvider getJavaModuleResolver() {
|
||||
return this.javaModuleResolver;
|
||||
}
|
||||
|
||||
public final JavaPropertyInitializerEvaluator getJavaPropertyInitializerEvaluator() {
|
||||
return this.javaPropertyInitializerEvaluator;
|
||||
}
|
||||
|
||||
public final JavaResolverCache getJavaResolverCache() {
|
||||
return this.javaResolverCache;
|
||||
}
|
||||
|
||||
public final JavaTypeEnhancementState getJavaTypeEnhancementState() {
|
||||
return this.javaTypeEnhancementState;
|
||||
}
|
||||
|
||||
public final KotlinClassFinder getKotlinClassFinder() {
|
||||
return this.kotlinClassFinder;
|
||||
}
|
||||
|
||||
public final NewKotlinTypeChecker getKotlinTypeChecker() {
|
||||
return this.kotlinTypeChecker;
|
||||
}
|
||||
|
||||
public final LookupTracker getLookupTracker() {
|
||||
return this.lookupTracker;
|
||||
}
|
||||
|
||||
public final ModuleDescriptor getModule() {
|
||||
return this.module;
|
||||
}
|
||||
|
||||
public final ModuleClassResolver getModuleClassResolver() {
|
||||
return this.moduleClassResolver;
|
||||
}
|
||||
|
||||
public final PackagePartProvider getPackagePartProvider() {
|
||||
return this.packagePartProvider;
|
||||
}
|
||||
|
||||
public final ReflectionTypes getReflectionTypes() {
|
||||
return this.reflectionTypes;
|
||||
}
|
||||
|
||||
public final JavaResolverSettings getSettings() {
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
public final SignatureEnhancement getSignatureEnhancement() {
|
||||
return this.signatureEnhancement;
|
||||
}
|
||||
|
||||
public final SignaturePropagator getSignaturePropagator() {
|
||||
return this.signaturePropagator;
|
||||
}
|
||||
|
||||
public final JavaSourceElementFactory getSourceElementFactory() {
|
||||
return this.sourceElementFactory;
|
||||
}
|
||||
|
||||
public final StorageManager getStorageManager() {
|
||||
return this.storageManager;
|
||||
}
|
||||
|
||||
public final SupertypeLoopChecker getSupertypeLoopChecker() {
|
||||
return this.supertypeLoopChecker;
|
||||
}
|
||||
|
||||
public final SyntheticJavaPartsProvider getSyntheticPartsProvider() {
|
||||
return this.syntheticPartsProvider;
|
||||
}
|
||||
|
||||
public final JavaResolverComponents replace(JavaResolverCache javaResolverCache) {
|
||||
Intrinsics.checkNotNullParameter(javaResolverCache, "javaResolverCache");
|
||||
return new JavaResolverComponents(this.storageManager, this.finder, this.kotlinClassFinder, this.deserializedDescriptorResolver, this.signaturePropagator, this.errorReporter, javaResolverCache, this.javaPropertyInitializerEvaluator, this.samConversionResolver, this.sourceElementFactory, this.moduleClassResolver, this.packagePartProvider, this.supertypeLoopChecker, this.lookupTracker, this.module, this.reflectionTypes, this.annotationTypeQualifierResolver, this.signatureEnhancement, this.javaClassesTracker, this.settings, this.kotlinTypeChecker, this.javaTypeEnhancementState, this.javaModuleResolver, null, 8388608, null);
|
||||
}
|
||||
|
||||
public /* synthetic */ JavaResolverComponents(StorageManager storageManager, JavaClassFinder javaClassFinder, KotlinClassFinder kotlinClassFinder, DeserializedDescriptorResolver deserializedDescriptorResolver, SignaturePropagator signaturePropagator, ErrorReporter errorReporter, JavaResolverCache javaResolverCache, JavaPropertyInitializerEvaluator javaPropertyInitializerEvaluator, SamConversionResolver samConversionResolver, JavaSourceElementFactory javaSourceElementFactory, ModuleClassResolver moduleClassResolver, PackagePartProvider packagePartProvider, SupertypeLoopChecker supertypeLoopChecker, LookupTracker lookupTracker, ModuleDescriptor moduleDescriptor, ReflectionTypes reflectionTypes, AnnotationTypeQualifierResolver annotationTypeQualifierResolver, SignatureEnhancement signatureEnhancement, JavaClassesTracker javaClassesTracker, JavaResolverSettings javaResolverSettings, NewKotlinTypeChecker newKotlinTypeChecker, JavaTypeEnhancementState javaTypeEnhancementState, JavaModuleAnnotationsProvider javaModuleAnnotationsProvider, SyntheticJavaPartsProvider syntheticJavaPartsProvider, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(storageManager, javaClassFinder, kotlinClassFinder, deserializedDescriptorResolver, signaturePropagator, errorReporter, javaResolverCache, javaPropertyInitializerEvaluator, samConversionResolver, javaSourceElementFactory, moduleClassResolver, packagePartProvider, supertypeLoopChecker, lookupTracker, moduleDescriptor, reflectionTypes, annotationTypeQualifierResolver, signatureEnhancement, javaClassesTracker, javaResolverSettings, newKotlinTypeChecker, javaTypeEnhancementState, javaModuleAnnotationsProvider, (i & 8388608) != 0 ? SyntheticJavaPartsProvider.Companion.getEMPTY() : syntheticJavaPartsProvider);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaResolverSettings {
|
||||
public static final Companion Companion = Companion.$$INSTANCE;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
static final /* synthetic */ Companion $$INSTANCE = new Companion();
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Default implements JavaResolverSettings {
|
||||
public static final Default INSTANCE = new Default();
|
||||
|
||||
private Default() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.JavaResolverSettings
|
||||
public boolean getCorrectNullabilityForNotNullTypeParameter() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.JavaResolverSettings
|
||||
public boolean getEnhancePrimitiveArrays() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.JavaResolverSettings
|
||||
public boolean getIgnoreNullabilityForErasedValueParameters() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.JavaResolverSettings
|
||||
public boolean getTypeEnhancementImprovementsInStrictMode() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
boolean getCorrectNullabilityForNotNullTypeParameter();
|
||||
|
||||
boolean getEnhancePrimitiveArrays();
|
||||
|
||||
boolean getIgnoreNullabilityForErasedValueParameters();
|
||||
|
||||
boolean getTypeEnhancementImprovementsInStrictMode();
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import java.util.Iterator;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaAnnotationMapper;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationOwner;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNullable;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaAnnotations implements Annotations {
|
||||
private final MemoizedFunctionToNullable<JavaAnnotation, AnnotationDescriptor> annotationDescriptors;
|
||||
private final JavaAnnotationOwner annotationOwner;
|
||||
private final boolean areAnnotationsFreshlySupported;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7125c;
|
||||
|
||||
public LazyJavaAnnotations(LazyJavaResolverContext c4, JavaAnnotationOwner annotationOwner, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(annotationOwner, "annotationOwner");
|
||||
this.f7125c = c4;
|
||||
this.annotationOwner = annotationOwner;
|
||||
this.areAnnotationsFreshlySupported = z3;
|
||||
this.annotationDescriptors = c4.getComponents().getStorageManager().createMemoizedFunctionWithNullableValues(new Function1<JavaAnnotation, AnnotationDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotations$annotationDescriptors$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final AnnotationDescriptor invoke(JavaAnnotation annotation) {
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
boolean z4;
|
||||
Intrinsics.checkNotNullParameter(annotation, "annotation");
|
||||
JavaAnnotationMapper javaAnnotationMapper = JavaAnnotationMapper.INSTANCE;
|
||||
lazyJavaResolverContext = LazyJavaAnnotations.this.f7125c;
|
||||
z4 = LazyJavaAnnotations.this.areAnnotationsFreshlySupported;
|
||||
return javaAnnotationMapper.mapOrResolveJavaAnnotation(annotation, lazyJavaResolverContext, z4);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations
|
||||
/* renamed from: findAnnotation */
|
||||
public AnnotationDescriptor mo1389findAnnotation(FqName fqName) {
|
||||
AnnotationDescriptor invoke;
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
JavaAnnotation findAnnotation = this.annotationOwner.findAnnotation(fqName);
|
||||
return (findAnnotation == null || (invoke = this.annotationDescriptors.invoke(findAnnotation)) == null) ? JavaAnnotationMapper.INSTANCE.findMappedJavaAnnotation(fqName, this.annotationOwner, this.f7125c) : invoke;
|
||||
}
|
||||
|
||||
@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 this.annotationOwner.getAnnotations().isEmpty() && !this.annotationOwner.isDeprecatedInJavaDoc();
|
||||
}
|
||||
|
||||
@Override // java.lang.Iterable
|
||||
public Iterator<AnnotationDescriptor> iterator() {
|
||||
return SequencesKt.filterNotNull(SequencesKt.plus((Sequence<? extends AnnotationDescriptor>) SequencesKt.map(CollectionsKt.asSequence(this.annotationOwner.getAnnotations()), this.annotationDescriptors), JavaAnnotationMapper.INSTANCE.findMappedJavaAnnotation(StandardNames.FqNames.deprecated, this.annotationOwner, this.f7125c))).iterator();
|
||||
}
|
||||
|
||||
public /* synthetic */ LazyJavaAnnotations(LazyJavaResolverContext lazyJavaResolverContext, JavaAnnotationOwner javaAnnotationOwner, boolean z3, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(lazyJavaResolverContext, javaAnnotationOwner, (i & 4) != 0 ? false : z3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotationOwner;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaAnnotationsKt {
|
||||
public static final Annotations resolveAnnotations(LazyJavaResolverContext lazyJavaResolverContext, JavaAnnotationOwner annotationsOwner) {
|
||||
Intrinsics.checkNotNullParameter(lazyJavaResolverContext, "<this>");
|
||||
Intrinsics.checkNotNullParameter(annotationsOwner, "annotationsOwner");
|
||||
return new LazyJavaAnnotations(lazyJavaResolverContext, annotationsOwner, false, 4, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.LazyKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderOptimized;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaClassFinder$$Util;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.TypeParameterResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageFragment;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.CacheWithNotNullValues;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.CollectionsKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaPackageFragmentProvider implements PackageFragmentProviderOptimized {
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7126c;
|
||||
private final CacheWithNotNullValues<FqName, LazyJavaPackageFragment> packageFragments;
|
||||
|
||||
public LazyJavaPackageFragmentProvider(JavaResolverComponents components) {
|
||||
Intrinsics.checkNotNullParameter(components, "components");
|
||||
LazyJavaResolverContext lazyJavaResolverContext = new LazyJavaResolverContext(components, TypeParameterResolver.EMPTY.INSTANCE, LazyKt.lazyOf(null));
|
||||
this.f7126c = lazyJavaResolverContext;
|
||||
this.packageFragments = lazyJavaResolverContext.getStorageManager().createCacheWithNotNullValues();
|
||||
}
|
||||
|
||||
private final LazyJavaPackageFragment getPackageFragment(FqName fqName) {
|
||||
final JavaPackage findPackage$default = JavaClassFinder$$Util.findPackage$default(this.f7126c.getComponents().getFinder(), fqName, false, 2, null);
|
||||
if (findPackage$default == null) {
|
||||
return null;
|
||||
}
|
||||
return this.packageFragments.computeIfAbsent(fqName, new Function0<LazyJavaPackageFragment>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaPackageFragmentProvider$getPackageFragment$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final LazyJavaPackageFragment invoke() {
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
lazyJavaResolverContext = LazyJavaPackageFragmentProvider.this.f7126c;
|
||||
return new LazyJavaPackageFragment(lazyJavaResolverContext, findPackage$default);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderOptimized
|
||||
public void collectPackageFragments(FqName fqName, Collection<PackageFragmentDescriptor> packageFragments) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(packageFragments, "packageFragments");
|
||||
CollectionsKt.addIfNotNull(packageFragments, getPackageFragment(fqName));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider
|
||||
@Deprecated(message = "for usages use #packageFragments(FqName) at final point, for impl use #collectPackageFragments(FqName, MutableCollection<PackageFragmentDescriptor>)")
|
||||
public List<LazyJavaPackageFragment> getPackageFragments(FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
return kotlin.collections.CollectionsKt.listOfNotNull(getPackageFragment(fqName));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider
|
||||
public /* bridge */ /* synthetic */ Collection getSubPackagesOf(FqName fqName, Function1 function1) {
|
||||
return getSubPackagesOf(fqName, (Function1<? super Name, Boolean>) function1);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderOptimized
|
||||
public boolean isEmpty(FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
return JavaClassFinder$$Util.findPackage$default(this.f7126c.getComponents().getFinder(), fqName, false, 2, null) == null;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "LazyJavaPackageFragmentProvider of module " + this.f7126c.getComponents().getModule();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider
|
||||
public List<FqName> getSubPackagesOf(FqName fqName, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
LazyJavaPackageFragment packageFragment = getPackageFragment(fqName);
|
||||
List<FqName> subPackageFqNames$descriptors_jvm = packageFragment != null ? packageFragment.getSubPackageFqNames$descriptors_jvm() : null;
|
||||
return subPackageFqNames$descriptors_jvm == null ? kotlin.collections.CollectionsKt.emptyList() : subPackageFqNames$descriptors_jvm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.Lazy;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaTypeQualifiersByElementType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaResolverContext {
|
||||
private final JavaResolverComponents components;
|
||||
private final Lazy defaultTypeQualifiers$delegate;
|
||||
private final Lazy<JavaTypeQualifiersByElementType> delegateForDefaultTypeQualifiers;
|
||||
private final TypeParameterResolver typeParameterResolver;
|
||||
private final JavaTypeResolver typeResolver;
|
||||
|
||||
public LazyJavaResolverContext(JavaResolverComponents components, TypeParameterResolver typeParameterResolver, Lazy<JavaTypeQualifiersByElementType> delegateForDefaultTypeQualifiers) {
|
||||
Intrinsics.checkNotNullParameter(components, "components");
|
||||
Intrinsics.checkNotNullParameter(typeParameterResolver, "typeParameterResolver");
|
||||
Intrinsics.checkNotNullParameter(delegateForDefaultTypeQualifiers, "delegateForDefaultTypeQualifiers");
|
||||
this.components = components;
|
||||
this.typeParameterResolver = typeParameterResolver;
|
||||
this.delegateForDefaultTypeQualifiers = delegateForDefaultTypeQualifiers;
|
||||
this.defaultTypeQualifiers$delegate = delegateForDefaultTypeQualifiers;
|
||||
this.typeResolver = new JavaTypeResolver(this, typeParameterResolver);
|
||||
}
|
||||
|
||||
public final JavaResolverComponents getComponents() {
|
||||
return this.components;
|
||||
}
|
||||
|
||||
public final JavaTypeQualifiersByElementType getDefaultTypeQualifiers() {
|
||||
return (JavaTypeQualifiersByElementType) this.defaultTypeQualifiers$delegate.getValue();
|
||||
}
|
||||
|
||||
public final Lazy<JavaTypeQualifiersByElementType> getDelegateForDefaultTypeQualifiers$descriptors_jvm() {
|
||||
return this.delegateForDefaultTypeQualifiers;
|
||||
}
|
||||
|
||||
public final ModuleDescriptor getModule() {
|
||||
return this.components.getModule();
|
||||
}
|
||||
|
||||
public final StorageManager getStorageManager() {
|
||||
return this.components.getStorageManager();
|
||||
}
|
||||
|
||||
public final TypeParameterResolver getTypeParameterResolver() {
|
||||
return this.typeParameterResolver;
|
||||
}
|
||||
|
||||
public final JavaTypeResolver getTypeResolver() {
|
||||
return this.typeResolver;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaTypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameterListOwner;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNullable;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.CollectionsKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaTypeParameterResolver implements TypeParameterResolver {
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7127c;
|
||||
private final DeclarationDescriptor containingDeclaration;
|
||||
private final MemoizedFunctionToNullable<JavaTypeParameter, LazyJavaTypeParameterDescriptor> resolve;
|
||||
private final Map<JavaTypeParameter, Integer> typeParameters;
|
||||
private final int typeParametersIndexOffset;
|
||||
|
||||
public LazyJavaTypeParameterResolver(LazyJavaResolverContext c4, DeclarationDescriptor containingDeclaration, JavaTypeParameterListOwner typeParameterOwner, int i) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
|
||||
Intrinsics.checkNotNullParameter(typeParameterOwner, "typeParameterOwner");
|
||||
this.f7127c = c4;
|
||||
this.containingDeclaration = containingDeclaration;
|
||||
this.typeParametersIndexOffset = i;
|
||||
this.typeParameters = CollectionsKt.mapToIndex(typeParameterOwner.getTypeParameters());
|
||||
this.resolve = c4.getStorageManager().createMemoizedFunctionWithNullableValues(new Function1<JavaTypeParameter, LazyJavaTypeParameterDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaTypeParameterResolver$resolve$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final LazyJavaTypeParameterDescriptor invoke(JavaTypeParameter typeParameter) {
|
||||
Map map;
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
DeclarationDescriptor declarationDescriptor;
|
||||
int i4;
|
||||
DeclarationDescriptor declarationDescriptor2;
|
||||
Intrinsics.checkNotNullParameter(typeParameter, "typeParameter");
|
||||
map = LazyJavaTypeParameterResolver.this.typeParameters;
|
||||
Integer num = (Integer) map.get(typeParameter);
|
||||
if (num == null) {
|
||||
return null;
|
||||
}
|
||||
LazyJavaTypeParameterResolver lazyJavaTypeParameterResolver = LazyJavaTypeParameterResolver.this;
|
||||
int intValue = num.intValue();
|
||||
lazyJavaResolverContext = lazyJavaTypeParameterResolver.f7127c;
|
||||
LazyJavaResolverContext child = ContextKt.child(lazyJavaResolverContext, lazyJavaTypeParameterResolver);
|
||||
declarationDescriptor = lazyJavaTypeParameterResolver.containingDeclaration;
|
||||
LazyJavaResolverContext copyWithNewDefaultTypeQualifiers = ContextKt.copyWithNewDefaultTypeQualifiers(child, declarationDescriptor.getAnnotations());
|
||||
i4 = lazyJavaTypeParameterResolver.typeParametersIndexOffset;
|
||||
declarationDescriptor2 = lazyJavaTypeParameterResolver.containingDeclaration;
|
||||
return new LazyJavaTypeParameterDescriptor(copyWithNewDefaultTypeQualifiers, typeParameter, i4 + intValue, declarationDescriptor2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.TypeParameterResolver
|
||||
public TypeParameterDescriptor resolveTypeParameter(JavaTypeParameter javaTypeParameter) {
|
||||
Intrinsics.checkNotNullParameter(javaTypeParameter, "javaTypeParameter");
|
||||
LazyJavaTypeParameterDescriptor invoke = this.resolve.invoke(javaTypeParameter);
|
||||
return invoke != null ? invoke : this.f7127c.getTypeParameterResolver().resolveTypeParameter(javaTypeParameter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ModuleClassResolver {
|
||||
ClassDescriptor resolveClass(JavaClass javaClass);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JavaDescriptorResolver;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SingleModuleClassResolver implements ModuleClassResolver {
|
||||
public JavaDescriptorResolver resolver;
|
||||
|
||||
public final JavaDescriptorResolver getResolver() {
|
||||
JavaDescriptorResolver javaDescriptorResolver = this.resolver;
|
||||
if (javaDescriptorResolver != null) {
|
||||
return javaDescriptorResolver;
|
||||
}
|
||||
Intrinsics.throwUninitializedPropertyAccessException("resolver");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.ModuleClassResolver
|
||||
public ClassDescriptor resolveClass(JavaClass javaClass) {
|
||||
Intrinsics.checkNotNullParameter(javaClass, "javaClass");
|
||||
return getResolver().resolveClass(javaClass);
|
||||
}
|
||||
|
||||
public final void setResolver(JavaDescriptorResolver javaDescriptorResolver) {
|
||||
Intrinsics.checkNotNullParameter(javaDescriptorResolver, "<set-?>");
|
||||
this.resolver = javaDescriptorResolver;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface TypeParameterResolver {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class EMPTY implements TypeParameterResolver {
|
||||
public static final EMPTY INSTANCE = new EMPTY();
|
||||
|
||||
private EMPTY() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.TypeParameterResolver
|
||||
public TypeParameterDescriptor resolveTypeParameter(JavaTypeParameter javaTypeParameter) {
|
||||
Intrinsics.checkNotNullParameter(javaTypeParameter, "javaTypeParameter");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
TypeParameterDescriptor resolveTypeParameter(JavaTypeParameter javaTypeParameter);
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.ranges.RangesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaField;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaLoadingKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMember;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMethod;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaRecordComponent;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nDeclaredMemberIndex.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DeclaredMemberIndex.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/ClassDeclaredMemberIndex\n+ 2 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,66:1\n988#2:67\n1017#2,3:68\n1020#2,3:78\n674#2:81\n704#2,4:82\n1155#2,3:95\n1155#2,3:98\n372#3,7:71\n766#4:86\n857#4,2:87\n1194#4,2:89\n1222#4,4:91\n*S KotlinDebug\n*F\n+ 1 DeclaredMemberIndex.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/ClassDeclaredMemberIndex\n*L\n52#1:67\n52#1:68,3\n52#1:78,3\n53#1:81\n53#1:82,4\n57#1:95,3\n60#1:98,3\n52#1:71,7\n54#1:86\n54#1:87,2\n54#1:89,2\n54#1:91,4\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class ClassDeclaredMemberIndex implements DeclaredMemberIndex {
|
||||
private final Map<Name, JavaRecordComponent> components;
|
||||
private final Map<Name, JavaField> fields;
|
||||
private final JavaClass jClass;
|
||||
private final Function1<JavaMember, Boolean> memberFilter;
|
||||
private final Function1<JavaMethod, Boolean> methodFilter;
|
||||
private final Map<Name, List<JavaMethod>> methods;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ClassDeclaredMemberIndex(JavaClass jClass, Function1<? super JavaMember, Boolean> memberFilter) {
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(jClass, "jClass");
|
||||
Intrinsics.checkNotNullParameter(memberFilter, "memberFilter");
|
||||
this.jClass = jClass;
|
||||
this.memberFilter = memberFilter;
|
||||
Function1<JavaMethod, Boolean> function1 = new Function1<JavaMethod, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.ClassDeclaredMemberIndex$methodFilter$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(JavaMethod m4) {
|
||||
Function1 function12;
|
||||
Intrinsics.checkNotNullParameter(m4, "m");
|
||||
function12 = ClassDeclaredMemberIndex.this.memberFilter;
|
||||
return Boolean.valueOf(((Boolean) function12.invoke(m4)).booleanValue() && !JavaLoadingKt.isObjectMethodInInterface(m4));
|
||||
}
|
||||
};
|
||||
this.methodFilter = function1;
|
||||
Sequence filter = SequencesKt.filter(CollectionsKt.asSequence(jClass.getMethods()), function1);
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
for (Object obj : filter) {
|
||||
Name name = ((JavaMethod) obj).getName();
|
||||
Object obj2 = linkedHashMap.get(name);
|
||||
if (obj2 == null) {
|
||||
obj2 = new ArrayList();
|
||||
linkedHashMap.put(name, obj2);
|
||||
}
|
||||
((List) obj2).add(obj);
|
||||
}
|
||||
this.methods = linkedHashMap;
|
||||
Sequence filter2 = SequencesKt.filter(CollectionsKt.asSequence(this.jClass.getFields()), this.memberFilter);
|
||||
LinkedHashMap linkedHashMap2 = new LinkedHashMap();
|
||||
for (Object obj3 : filter2) {
|
||||
linkedHashMap2.put(((JavaField) obj3).getName(), obj3);
|
||||
}
|
||||
this.fields = linkedHashMap2;
|
||||
Collection<JavaRecordComponent> recordComponents = this.jClass.getRecordComponents();
|
||||
Function1<JavaMember, Boolean> function12 = this.memberFilter;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Object obj4 : recordComponents) {
|
||||
if (((Boolean) function12.invoke(obj4)).booleanValue()) {
|
||||
arrayList.add(obj4);
|
||||
}
|
||||
}
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList, 10);
|
||||
LinkedHashMap linkedHashMap3 = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(collectionSizeOrDefault), 16));
|
||||
Iterator it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
Object next = it.next();
|
||||
linkedHashMap3.put(((JavaRecordComponent) next).getName(), next);
|
||||
}
|
||||
this.components = linkedHashMap3;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public JavaField findFieldByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return this.fields.get(name);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Collection<JavaMethod> findMethodsByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
List<JavaMethod> list = this.methods.get(name);
|
||||
return list != null ? list : CollectionsKt.emptyList();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public JavaRecordComponent findRecordComponentByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return this.components.get(name);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getFieldNames() {
|
||||
Sequence filter = SequencesKt.filter(CollectionsKt.asSequence(this.jClass.getFields()), this.memberFilter);
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
Iterator it = filter.iterator();
|
||||
while (it.hasNext()) {
|
||||
linkedHashSet.add(((JavaField) it.next()).getName());
|
||||
}
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getMethodNames() {
|
||||
Sequence filter = SequencesKt.filter(CollectionsKt.asSequence(this.jClass.getMethods()), this.methodFilter);
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
Iterator it = filter.iterator();
|
||||
while (it.hasNext()) {
|
||||
linkedHashSet.add(((JavaMethod) it.next()).getName());
|
||||
}
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getRecordComponentNames() {
|
||||
return this.components.keySet();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaField;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMethod;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaRecordComponent;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclaredMemberIndex {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Empty implements DeclaredMemberIndex {
|
||||
public static final Empty INSTANCE = new Empty();
|
||||
|
||||
private Empty() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public JavaField findFieldByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public JavaRecordComponent findRecordComponentByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getFieldNames() {
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getMethodNames() {
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public Set<Name> getRecordComponentNames() {
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex
|
||||
public List<JavaMethod> findMethodsByName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
JavaField findFieldByName(Name name);
|
||||
|
||||
Collection<JavaMethod> findMethodsByName(Name name);
|
||||
|
||||
JavaRecordComponent findRecordComponentByName(Name name);
|
||||
|
||||
Set<Name> getFieldNames();
|
||||
|
||||
Set<Name> getMethodNames();
|
||||
|
||||
Set<Name> getRecordComponentNames();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaDescriptorUtilKt {
|
||||
public static final boolean isJavaField(PropertyDescriptor propertyDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(propertyDescriptor, "<this>");
|
||||
return propertyDescriptor.getGetter() == null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.UtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.DeserializedDescriptorResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeKt;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
|
||||
import kotlin.reflect.jvm.internal.impl.util.collectionUtils.ScopeUtilsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJvmPackageScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JvmPackageScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/JvmPackageScope\n+ 2 scopeUtils.kt\norg/jetbrains/kotlin/util/collectionUtils/ScopeUtilsKt\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,109:1\n92#2,14:110\n60#2,5:124\n60#2,5:129\n60#2,5:134\n10394#3,5:139\n10394#3,5:144\n*S KotlinDebug\n*F\n+ 1 JvmPackageScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/JvmPackageScope\n*L\n58#1:110,14\n63#1:124,5\n68#1:129,5\n74#1:134,5\n76#1:139,5\n80#1:144,5\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JvmPackageScope implements MemberScope {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmPackageScope.class), "kotlinScopes", "getKotlinScopes()[Lorg/jetbrains/kotlin/resolve/scopes/MemberScope;"))};
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7128c;
|
||||
private final LazyJavaPackageScope javaScope;
|
||||
private final NotNullLazyValue kotlinScopes$delegate;
|
||||
private final LazyJavaPackageFragment packageFragment;
|
||||
|
||||
public JvmPackageScope(LazyJavaResolverContext c4, JavaPackage jPackage, LazyJavaPackageFragment packageFragment) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(jPackage, "jPackage");
|
||||
Intrinsics.checkNotNullParameter(packageFragment, "packageFragment");
|
||||
this.f7128c = c4;
|
||||
this.packageFragment = packageFragment;
|
||||
this.javaScope = new LazyJavaPackageScope(c4, jPackage, packageFragment);
|
||||
this.kotlinScopes$delegate = c4.getStorageManager().createLazyValue(new Function0<MemberScope[]>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.JvmPackageScope$kotlinScopes$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final MemberScope[] invoke() {
|
||||
LazyJavaPackageFragment lazyJavaPackageFragment;
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
LazyJavaPackageFragment lazyJavaPackageFragment2;
|
||||
lazyJavaPackageFragment = JvmPackageScope.this.packageFragment;
|
||||
Collection<KotlinJvmBinaryClass> values = lazyJavaPackageFragment.getBinaryClasses$descriptors_jvm().values();
|
||||
JvmPackageScope jvmPackageScope = JvmPackageScope.this;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (KotlinJvmBinaryClass kotlinJvmBinaryClass : values) {
|
||||
lazyJavaResolverContext = jvmPackageScope.f7128c;
|
||||
DeserializedDescriptorResolver deserializedDescriptorResolver = lazyJavaResolverContext.getComponents().getDeserializedDescriptorResolver();
|
||||
lazyJavaPackageFragment2 = jvmPackageScope.packageFragment;
|
||||
MemberScope createKotlinPackagePartScope = deserializedDescriptorResolver.createKotlinPackagePartScope(lazyJavaPackageFragment2, kotlinJvmBinaryClass);
|
||||
if (createKotlinPackagePartScope != null) {
|
||||
arrayList.add(createKotlinPackagePartScope);
|
||||
}
|
||||
}
|
||||
return (MemberScope[]) ScopeUtilsKt.listOfNonEmptyScopes(arrayList).toArray(new MemberScope[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private final MemberScope[] getKotlinScopes() {
|
||||
return (MemberScope[]) StorageKt.getValue(this.kotlinScopes$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getClassifierNames() {
|
||||
Set<Name> flatMapClassifierNamesOrNull = MemberScopeKt.flatMapClassifierNamesOrNull(ArraysKt.asIterable(getKotlinScopes()));
|
||||
if (flatMapClassifierNamesOrNull == null) {
|
||||
return null;
|
||||
}
|
||||
flatMapClassifierNamesOrNull.addAll(this.javaScope.getClassifierNames());
|
||||
return flatMapClassifierNamesOrNull;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
/* renamed from: getContributedClassifier */
|
||||
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
mo1400recordLookup(name, location);
|
||||
ClassDescriptor mo1396getContributedClassifier = this.javaScope.mo1396getContributedClassifier(name, location);
|
||||
if (mo1396getContributedClassifier != null) {
|
||||
return mo1396getContributedClassifier;
|
||||
}
|
||||
ClassifierDescriptor classifierDescriptor = null;
|
||||
for (MemberScope memberScope : getKotlinScopes()) {
|
||||
ClassifierDescriptor mo1396getContributedClassifier2 = memberScope.mo1396getContributedClassifier(name, location);
|
||||
if (mo1396getContributedClassifier2 != null) {
|
||||
if (!(mo1396getContributedClassifier2 instanceof ClassifierDescriptorWithTypeParameters) || !((ClassifierDescriptorWithTypeParameters) mo1396getContributedClassifier2).isExpect()) {
|
||||
return mo1396getContributedClassifier2;
|
||||
}
|
||||
if (classifierDescriptor == null) {
|
||||
classifierDescriptor = mo1396getContributedClassifier2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return classifierDescriptor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
LazyJavaPackageScope lazyJavaPackageScope = this.javaScope;
|
||||
MemberScope[] kotlinScopes = getKotlinScopes();
|
||||
Collection<DeclarationDescriptor> contributedDescriptors = lazyJavaPackageScope.getContributedDescriptors(kindFilter, nameFilter);
|
||||
for (MemberScope memberScope : kotlinScopes) {
|
||||
contributedDescriptors = ScopeUtilsKt.concat(contributedDescriptors, memberScope.getContributedDescriptors(kindFilter, nameFilter));
|
||||
}
|
||||
return contributedDescriptors == null ? SetsKt.emptySet() : contributedDescriptors;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
mo1400recordLookup(name, location);
|
||||
LazyJavaPackageScope lazyJavaPackageScope = this.javaScope;
|
||||
MemberScope[] kotlinScopes = getKotlinScopes();
|
||||
Collection<? extends SimpleFunctionDescriptor> contributedFunctions = lazyJavaPackageScope.getContributedFunctions(name, location);
|
||||
int length = kotlinScopes.length;
|
||||
int i = 0;
|
||||
Collection collection = contributedFunctions;
|
||||
while (i < length) {
|
||||
Collection concat = ScopeUtilsKt.concat(collection, kotlinScopes[i].getContributedFunctions(name, location));
|
||||
i++;
|
||||
collection = concat;
|
||||
}
|
||||
return collection == null ? SetsKt.emptySet() : collection;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
mo1400recordLookup(name, location);
|
||||
LazyJavaPackageScope lazyJavaPackageScope = this.javaScope;
|
||||
MemberScope[] kotlinScopes = getKotlinScopes();
|
||||
Collection<? extends PropertyDescriptor> contributedVariables = lazyJavaPackageScope.getContributedVariables(name, location);
|
||||
int length = kotlinScopes.length;
|
||||
int i = 0;
|
||||
Collection collection = contributedVariables;
|
||||
while (i < length) {
|
||||
Collection concat = ScopeUtilsKt.concat(collection, kotlinScopes[i].getContributedVariables(name, location));
|
||||
i++;
|
||||
collection = concat;
|
||||
}
|
||||
return collection == null ? SetsKt.emptySet() : collection;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getFunctionNames() {
|
||||
MemberScope[] kotlinScopes = getKotlinScopes();
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
for (MemberScope memberScope : kotlinScopes) {
|
||||
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, memberScope.getFunctionNames());
|
||||
}
|
||||
linkedHashSet.addAll(this.javaScope.getFunctionNames());
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
public final LazyJavaPackageScope getJavaScope$descriptors_jvm() {
|
||||
return this.javaScope;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getVariableNames() {
|
||||
MemberScope[] kotlinScopes = getKotlinScopes();
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
for (MemberScope memberScope : kotlinScopes) {
|
||||
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, memberScope.getVariableNames());
|
||||
}
|
||||
linkedHashSet.addAll(this.javaScope.getVariableNames());
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
/* renamed from: recordLookup */
|
||||
public void mo1400recordLookup(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
UtilsKt.record(this.f7128c.getComponents().getLookupTracker(), location, this.packageFragment, name);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "scope for " + this.packageFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.jvm.JavaToKotlinClassMapper;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JvmAnnotationNames;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.DescriptorResolverUtils;
|
||||
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.lazy.types.JavaTypeAttributesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.sources.JavaSourceElement;
|
||||
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.load.java.structure.JavaAnnotationAsAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaArrayAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassObjectAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaEnumValueAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaLiteralAnnotationArgument;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRenderer;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.AnnotationValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValueFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.EnumValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.KClassValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.NullValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NullableLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaAnnotationDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaAnnotationDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaAnnotationDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,124:1\n1549#2:125\n1620#2,3:126\n*S KotlinDebug\n*F\n+ 1 LazyJavaAnnotationDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaAnnotationDescriptor\n*L\n94#1:125\n94#1:126,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaAnnotationDescriptor implements AnnotationDescriptor, PossiblyExternalAnnotationDescriptor {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaAnnotationDescriptor.class), "fqName", "getFqName()Lorg/jetbrains/kotlin/name/FqName;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaAnnotationDescriptor.class), "type", "getType()Lorg/jetbrains/kotlin/types/SimpleType;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaAnnotationDescriptor.class), "allValueArguments", "getAllValueArguments()Ljava/util/Map;"))};
|
||||
private final NotNullLazyValue allValueArguments$delegate;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7129c;
|
||||
private final NullableLazyValue fqName$delegate;
|
||||
private final boolean isFreshlySupportedTypeUseAnnotation;
|
||||
private final boolean isIdeExternalAnnotation;
|
||||
private final JavaAnnotation javaAnnotation;
|
||||
private final JavaSourceElement source;
|
||||
private final NotNullLazyValue type$delegate;
|
||||
|
||||
public LazyJavaAnnotationDescriptor(LazyJavaResolverContext c4, JavaAnnotation javaAnnotation, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(javaAnnotation, "javaAnnotation");
|
||||
this.f7129c = c4;
|
||||
this.javaAnnotation = javaAnnotation;
|
||||
this.fqName$delegate = c4.getStorageManager().createNullableLazyValue(new Function0<FqName>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaAnnotationDescriptor$fqName$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final FqName invoke() {
|
||||
JavaAnnotation javaAnnotation2;
|
||||
javaAnnotation2 = LazyJavaAnnotationDescriptor.this.javaAnnotation;
|
||||
ClassId classId = javaAnnotation2.getClassId();
|
||||
if (classId != null) {
|
||||
return classId.asSingleFqName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
this.type$delegate = c4.getStorageManager().createLazyValue(new Function0<SimpleType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaAnnotationDescriptor$type$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final SimpleType invoke() {
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
JavaAnnotation javaAnnotation2;
|
||||
LazyJavaResolverContext lazyJavaResolverContext2;
|
||||
JavaAnnotation javaAnnotation3;
|
||||
FqName fqName = LazyJavaAnnotationDescriptor.this.getFqName();
|
||||
if (fqName == null) {
|
||||
ErrorTypeKind errorTypeKind = ErrorTypeKind.NOT_FOUND_FQNAME_FOR_JAVA_ANNOTATION;
|
||||
javaAnnotation3 = LazyJavaAnnotationDescriptor.this.javaAnnotation;
|
||||
return ErrorUtils.createErrorType(errorTypeKind, javaAnnotation3.toString());
|
||||
}
|
||||
JavaToKotlinClassMapper javaToKotlinClassMapper = JavaToKotlinClassMapper.INSTANCE;
|
||||
lazyJavaResolverContext = LazyJavaAnnotationDescriptor.this.f7129c;
|
||||
ClassDescriptor mapJavaToKotlin$default = JavaToKotlinClassMapper.mapJavaToKotlin$default(javaToKotlinClassMapper, fqName, lazyJavaResolverContext.getModule().getBuiltIns(), null, 4, null);
|
||||
if (mapJavaToKotlin$default == null) {
|
||||
javaAnnotation2 = LazyJavaAnnotationDescriptor.this.javaAnnotation;
|
||||
JavaClass resolve = javaAnnotation2.resolve();
|
||||
if (resolve != null) {
|
||||
lazyJavaResolverContext2 = LazyJavaAnnotationDescriptor.this.f7129c;
|
||||
mapJavaToKotlin$default = lazyJavaResolverContext2.getComponents().getModuleClassResolver().resolveClass(resolve);
|
||||
} else {
|
||||
mapJavaToKotlin$default = null;
|
||||
}
|
||||
if (mapJavaToKotlin$default == null) {
|
||||
mapJavaToKotlin$default = LazyJavaAnnotationDescriptor.this.createTypeForMissingDependencies(fqName);
|
||||
}
|
||||
}
|
||||
return mapJavaToKotlin$default.getDefaultType();
|
||||
}
|
||||
});
|
||||
this.source = c4.getComponents().getSourceElementFactory().source(javaAnnotation);
|
||||
this.allValueArguments$delegate = c4.getStorageManager().createLazyValue(new Function0<Map<Name, ? extends ConstantValue<?>>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaAnnotationDescriptor$allValueArguments$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Map<Name, ? extends ConstantValue<?>> invoke() {
|
||||
JavaAnnotation javaAnnotation2;
|
||||
ConstantValue resolveAnnotationArgument;
|
||||
javaAnnotation2 = LazyJavaAnnotationDescriptor.this.javaAnnotation;
|
||||
Collection<JavaAnnotationArgument> arguments = javaAnnotation2.getArguments();
|
||||
LazyJavaAnnotationDescriptor lazyJavaAnnotationDescriptor = LazyJavaAnnotationDescriptor.this;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (JavaAnnotationArgument javaAnnotationArgument : arguments) {
|
||||
Name name = javaAnnotationArgument.getName();
|
||||
if (name == null) {
|
||||
name = JvmAnnotationNames.DEFAULT_ANNOTATION_MEMBER_NAME;
|
||||
}
|
||||
resolveAnnotationArgument = lazyJavaAnnotationDescriptor.resolveAnnotationArgument(javaAnnotationArgument);
|
||||
Pair pair = resolveAnnotationArgument != null ? TuplesKt.to(name, resolveAnnotationArgument) : null;
|
||||
if (pair != null) {
|
||||
arrayList.add(pair);
|
||||
}
|
||||
}
|
||||
return MapsKt.toMap(arrayList);
|
||||
}
|
||||
});
|
||||
this.isIdeExternalAnnotation = javaAnnotation.isIdeExternalAnnotation();
|
||||
this.isFreshlySupportedTypeUseAnnotation = javaAnnotation.isFreshlySupportedTypeUseAnnotation() || z3;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final ClassDescriptor createTypeForMissingDependencies(FqName fqName) {
|
||||
ModuleDescriptor module = this.f7129c.getModule();
|
||||
ClassId classId = ClassId.topLevel(fqName);
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
return FindClassInModuleKt.findNonGenericClassAcrossDependencies(module, classId, this.f7129c.getComponents().getDeserializedDescriptorResolver().getComponents().getNotFoundClasses());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final ConstantValue<?> resolveAnnotationArgument(JavaAnnotationArgument javaAnnotationArgument) {
|
||||
if (javaAnnotationArgument instanceof JavaLiteralAnnotationArgument) {
|
||||
return ConstantValueFactory.createConstantValue$default(ConstantValueFactory.INSTANCE, ((JavaLiteralAnnotationArgument) javaAnnotationArgument).getValue(), null, 2, null);
|
||||
}
|
||||
if (javaAnnotationArgument instanceof JavaEnumValueAnnotationArgument) {
|
||||
JavaEnumValueAnnotationArgument javaEnumValueAnnotationArgument = (JavaEnumValueAnnotationArgument) javaAnnotationArgument;
|
||||
return resolveFromEnumValue(javaEnumValueAnnotationArgument.getEnumClassId(), javaEnumValueAnnotationArgument.getEntryName());
|
||||
}
|
||||
if (!(javaAnnotationArgument instanceof JavaArrayAnnotationArgument)) {
|
||||
if (javaAnnotationArgument instanceof JavaAnnotationAsAnnotationArgument) {
|
||||
return resolveFromAnnotation(((JavaAnnotationAsAnnotationArgument) javaAnnotationArgument).getAnnotation());
|
||||
}
|
||||
if (javaAnnotationArgument instanceof JavaClassObjectAnnotationArgument) {
|
||||
return resolveFromJavaClassObjectType(((JavaClassObjectAnnotationArgument) javaAnnotationArgument).getReferencedType());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
JavaArrayAnnotationArgument javaArrayAnnotationArgument = (JavaArrayAnnotationArgument) javaAnnotationArgument;
|
||||
Name name = javaArrayAnnotationArgument.getName();
|
||||
if (name == null) {
|
||||
name = JvmAnnotationNames.DEFAULT_ANNOTATION_MEMBER_NAME;
|
||||
}
|
||||
Intrinsics.checkNotNull(name);
|
||||
return resolveFromArray(name, javaArrayAnnotationArgument.getElements());
|
||||
}
|
||||
|
||||
private final ConstantValue<?> resolveFromAnnotation(JavaAnnotation javaAnnotation) {
|
||||
return new AnnotationValue(new LazyJavaAnnotationDescriptor(this.f7129c, javaAnnotation, false, 4, null));
|
||||
}
|
||||
|
||||
private final ConstantValue<?> resolveFromArray(Name name, List<? extends JavaAnnotationArgument> list) {
|
||||
KotlinType arrayType;
|
||||
int collectionSizeOrDefault;
|
||||
SimpleType type = getType();
|
||||
Intrinsics.checkNotNullExpressionValue(type, "<get-type>(...)");
|
||||
if (KotlinTypeKt.isError(type)) {
|
||||
return null;
|
||||
}
|
||||
ClassDescriptor annotationClass = DescriptorUtilsKt.getAnnotationClass(this);
|
||||
Intrinsics.checkNotNull(annotationClass);
|
||||
ValueParameterDescriptor annotationParameterByName = DescriptorResolverUtils.getAnnotationParameterByName(name, annotationClass);
|
||||
if (annotationParameterByName == null || (arrayType = annotationParameterByName.getType()) == null) {
|
||||
arrayType = this.f7129c.getComponents().getModule().getBuiltIns().getArrayType(Variance.INVARIANT, ErrorUtils.createErrorType(ErrorTypeKind.UNKNOWN_ARRAY_ELEMENT_TYPE_OF_ANNOTATION_ARGUMENT, new String[0]));
|
||||
}
|
||||
Intrinsics.checkNotNull(arrayType);
|
||||
List<? extends JavaAnnotationArgument> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = list2.iterator();
|
||||
while (it.hasNext()) {
|
||||
ConstantValue<?> resolveAnnotationArgument = resolveAnnotationArgument((JavaAnnotationArgument) it.next());
|
||||
if (resolveAnnotationArgument == null) {
|
||||
resolveAnnotationArgument = new NullValue();
|
||||
}
|
||||
arrayList.add(resolveAnnotationArgument);
|
||||
}
|
||||
return ConstantValueFactory.INSTANCE.createArrayValue(arrayList, arrayType);
|
||||
}
|
||||
|
||||
private final ConstantValue<?> resolveFromEnumValue(ClassId classId, Name name) {
|
||||
if (classId == null || name == null) {
|
||||
return null;
|
||||
}
|
||||
return new EnumValue(classId, name);
|
||||
}
|
||||
|
||||
private final ConstantValue<?> resolveFromJavaClassObjectType(JavaType javaType) {
|
||||
return KClassValue.Companion.create(this.f7129c.getTypeResolver().transformJavaType(javaType, JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, null, 7, null)));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public Map<Name, ConstantValue<?>> getAllValueArguments() {
|
||||
return (Map) StorageKt.getValue(this.allValueArguments$delegate, this, (KProperty<?>) $$delegatedProperties[2]);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public FqName getFqName() {
|
||||
return (FqName) StorageKt.getValue(this.fqName$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
public final boolean isFreshlySupportedTypeUseAnnotation() {
|
||||
return this.isFreshlySupportedTypeUseAnnotation;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.descriptors.PossiblyExternalAnnotationDescriptor
|
||||
public boolean isIdeExternalAnnotation() {
|
||||
return this.isIdeExternalAnnotation;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return DescriptorRenderer.renderAnnotation$default(DescriptorRenderer.FQ_NAMES_IN_TYPES, this, null, 2, null);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public JavaSourceElement getSource() {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor
|
||||
public SimpleType getType() {
|
||||
return (SimpleType) StorageKt.getValue(this.type$delegate, this, (KProperty<?>) $$delegatedProperties[1]);
|
||||
}
|
||||
|
||||
public /* synthetic */ LazyJavaAnnotationDescriptor(LazyJavaResolverContext lazyJavaResolverContext, JavaAnnotation javaAnnotation, boolean z3, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(lazyJavaResolverContext, javaAnnotation, (i & 4) != 0 ? false : z3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,590 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.LazyKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.comparisons.ComparisonsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.jvm.MappingUtilKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassConstructorDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassKind;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ScopesHolderForClass;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SupertypeLoopChecker;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Visibility;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassDescriptorBase;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaDescriptorVisibilities;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JvmAnnotationNames;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.UtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.ContextKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotationsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaAnnotation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifierType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqNamesUtilKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.StringValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.InnerClassesScopeWrapper;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ErrorReporter;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.types.AbstractClassTypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaClassDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaClassDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,322:1\n1747#2,3:323\n1747#2,3:326\n1603#2,9:329\n1855#2:338\n1856#2:340\n1612#2:341\n1045#2:342\n1#3:339\n*S KotlinDebug\n*F\n+ 1 LazyJavaClassDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor\n*L\n185#1:323,3\n188#1:326,3\n200#1:329,9\n200#1:338\n200#1:340\n200#1:341\n202#1:342\n200#1:339\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaClassDescriptor extends ClassDescriptorBase implements JavaClassDescriptor {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final Set<String> PUBLIC_METHOD_NAMES_IN_OBJECT = SetsKt.setOf((Object[]) new String[]{"equals", "hashCode", "getClass", "wait", "notify", "notifyAll", "toString"});
|
||||
private final ClassDescriptor additionalSupertypeClassDescriptor;
|
||||
private final Annotations annotations;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7130c;
|
||||
private final NotNullLazyValue<List<TypeParameterDescriptor>> declaredParameters;
|
||||
private final InnerClassesScopeWrapper innerClassesScope;
|
||||
private final boolean isInner;
|
||||
private final JavaClass jClass;
|
||||
private final ClassKind kind;
|
||||
private final Modality modality;
|
||||
private final Lazy moduleAnnotations$delegate;
|
||||
private final LazyJavaResolverContext outerContext;
|
||||
private final ScopesHolderForClass<LazyJavaClassMemberScope> scopeHolder;
|
||||
private final LazyJavaStaticClassScope staticScope;
|
||||
private final LazyJavaClassTypeConstructor typeConstructor;
|
||||
private final LazyJavaClassMemberScope unsubstitutedMemberScope;
|
||||
private final Visibility visibility;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaClassDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaClassDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor$LazyJavaClassTypeConstructor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,322:1\n1549#2:323\n1620#2,3:324\n1549#2:327\n1620#2,3:328\n1549#2:331\n1620#2,3:332\n*S KotlinDebug\n*F\n+ 1 LazyJavaClassDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor$LazyJavaClassTypeConstructor\n*L\n254#1:323\n254#1:324,3\n280#1:327\n280#1:328,3\n285#1:331\n285#1:332,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaClassTypeConstructor extends AbstractClassTypeConstructor {
|
||||
private final NotNullLazyValue<List<TypeParameterDescriptor>> parameters;
|
||||
|
||||
public LazyJavaClassTypeConstructor() {
|
||||
super(LazyJavaClassDescriptor.this.f7130c.getStorageManager());
|
||||
this.parameters = LazyJavaClassDescriptor.this.f7130c.getStorageManager().createLazyValue(new Function0<List<? extends TypeParameterDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor$LazyJavaClassTypeConstructor$parameters$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final List<? extends TypeParameterDescriptor> invoke() {
|
||||
return TypeParameterUtilsKt.computeConstructorTypeParameters(LazyJavaClassDescriptor.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX ERROR: JadxRuntimeException in pass: IfRegionVisitor
|
||||
jadx.core.utils.exceptions.JadxRuntimeException: Can't remove SSA var: r2v4 kotlin.reflect.jvm.internal.impl.name.FqName, still in use, count: 2, list:
|
||||
(r2v4 kotlin.reflect.jvm.internal.impl.name.FqName) from 0x0025: IF (r2v4 kotlin.reflect.jvm.internal.impl.name.FqName) == (null kotlin.reflect.jvm.internal.impl.name.FqName) -> B:32:0x00cf A[HIDDEN]
|
||||
(r2v4 kotlin.reflect.jvm.internal.impl.name.FqName) from 0x002a: PHI (r2v1 kotlin.reflect.jvm.internal.impl.name.FqName) = (r2v0 kotlin.reflect.jvm.internal.impl.name.FqName), (r2v4 kotlin.reflect.jvm.internal.impl.name.FqName) binds: [B:33:0x0029, B:9:0x0025] A[DONT_GENERATE, DONT_INLINE]
|
||||
at jadx.core.utils.InsnRemover.removeSsaVar(InsnRemover.java:151)
|
||||
at jadx.core.utils.InsnRemover.unbindResult(InsnRemover.java:116)
|
||||
at jadx.core.dex.visitors.regions.TernaryMod.makeTernaryInsn(TernaryMod.java:114)
|
||||
at jadx.core.dex.visitors.regions.TernaryMod.processRegion(TernaryMod.java:62)
|
||||
at jadx.core.dex.visitors.regions.TernaryMod.enterRegion(TernaryMod.java:45)
|
||||
at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseInternal(DepthRegionTraversal.java:67)
|
||||
at jadx.core.dex.visitors.regions.DepthRegionTraversal.lambda$traverseInternal$0(DepthRegionTraversal.java:68)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
|
||||
at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseInternal(DepthRegionTraversal.java:68)
|
||||
at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverse(DepthRegionTraversal.java:19)
|
||||
at jadx.core.dex.visitors.regions.TernaryMod.process(TernaryMod.java:35)
|
||||
at jadx.core.dex.visitors.regions.IfRegionVisitor.process(IfRegionVisitor.java:34)
|
||||
at jadx.core.dex.visitors.regions.IfRegionVisitor.visit(IfRegionVisitor.java:30)
|
||||
*/
|
||||
private final kotlin.reflect.jvm.internal.impl.types.KotlinType getPurelyImplementedSupertype() {
|
||||
/*
|
||||
r6 = this;
|
||||
kotlin.reflect.jvm.internal.impl.name.FqName r0 = r6.getPurelyImplementsFqNameFromAnnotation()
|
||||
r1 = 0
|
||||
if (r0 == 0) goto L16
|
||||
boolean r2 = r0.isRoot()
|
||||
if (r2 != 0) goto L16
|
||||
kotlin.reflect.jvm.internal.impl.name.Name r2 = kotlin.reflect.jvm.internal.impl.builtins.StandardNames.BUILT_INS_PACKAGE_NAME
|
||||
boolean r2 = r0.startsWith(r2)
|
||||
if (r2 == 0) goto L16
|
||||
goto L17
|
||||
L16:
|
||||
r0 = r1
|
||||
L17:
|
||||
if (r0 != 0) goto L29
|
||||
kotlin.reflect.jvm.internal.impl.load.java.FakePureImplementationsProvider r2 = kotlin.reflect.jvm.internal.impl.load.java.FakePureImplementationsProvider.INSTANCE
|
||||
kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor r3 = kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor.this
|
||||
kotlin.reflect.jvm.internal.impl.name.FqName r3 = kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt.getFqNameSafe(r3)
|
||||
kotlin.reflect.jvm.internal.impl.name.FqName r2 = r2.getPurelyImplementedInterface(r3)
|
||||
if (r2 != 0) goto L2a
|
||||
goto Lcf
|
||||
L29:
|
||||
r2 = r0
|
||||
L2a:
|
||||
kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor r3 = kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor.this
|
||||
kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext r3 = kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor.access$getC$p(r3)
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor r3 = r3.getModule()
|
||||
kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation r4 = kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation.FROM_JAVA_LOADER
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor r2 = kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt.resolveTopLevelClass(r3, r2, r4)
|
||||
if (r2 != 0) goto L3e
|
||||
goto Lcf
|
||||
L3e:
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeConstructor r3 = r2.getTypeConstructor()
|
||||
java.util.List r3 = r3.getParameters()
|
||||
int r3 = r3.size()
|
||||
kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor r6 = kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor.this
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeConstructor r6 = r6.getTypeConstructor()
|
||||
java.util.List r6 = r6.getParameters()
|
||||
java.lang.String r4 = "getParameters(...)"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r6, r4)
|
||||
int r4 = r6.size()
|
||||
if (r4 != r3) goto L89
|
||||
java.lang.Iterable r6 = (java.lang.Iterable) r6
|
||||
java.util.ArrayList r0 = new java.util.ArrayList
|
||||
int r1 = kotlin.collections.CollectionsKt.g(r6)
|
||||
r0.<init>(r1)
|
||||
java.util.Iterator r6 = r6.iterator()
|
||||
L6e:
|
||||
boolean r1 = r6.hasNext()
|
||||
if (r1 == 0) goto Lc4
|
||||
java.lang.Object r1 = r6.next()
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor r1 = (kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor) r1
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl r3 = new kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl
|
||||
kotlin.reflect.jvm.internal.impl.types.Variance r4 = kotlin.reflect.jvm.internal.impl.types.Variance.INVARIANT
|
||||
kotlin.reflect.jvm.internal.impl.types.SimpleType r1 = r1.getDefaultType()
|
||||
r3.<init>(r4, r1)
|
||||
r0.add(r3)
|
||||
goto L6e
|
||||
L89:
|
||||
r5 = 1
|
||||
if (r4 != r5) goto Lcf
|
||||
if (r3 <= r5) goto Lcf
|
||||
if (r0 != 0) goto Lcf
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl r0 = new kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl
|
||||
kotlin.reflect.jvm.internal.impl.types.Variance r1 = kotlin.reflect.jvm.internal.impl.types.Variance.INVARIANT
|
||||
java.lang.Object r6 = kotlin.collections.CollectionsKt.single(r6)
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor r6 = (kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor) r6
|
||||
kotlin.reflect.jvm.internal.impl.types.SimpleType r6 = r6.getDefaultType()
|
||||
r0.<init>(r1, r6)
|
||||
kotlin.ranges.IntRange r6 = new kotlin.ranges.IntRange
|
||||
r6.<init>(r5, r3)
|
||||
java.util.ArrayList r1 = new java.util.ArrayList
|
||||
int r3 = kotlin.collections.CollectionsKt.g(r6)
|
||||
r1.<init>(r3)
|
||||
java.util.Iterator r6 = r6.iterator()
|
||||
Lb3:
|
||||
boolean r3 = r6.hasNext()
|
||||
if (r3 == 0) goto Lc3
|
||||
r3 = r6
|
||||
kotlin.collections.IntIterator r3 = (kotlin.collections.IntIterator) r3
|
||||
r3.nextInt()
|
||||
r1.add(r0)
|
||||
goto Lb3
|
||||
Lc3:
|
||||
r0 = r1
|
||||
Lc4:
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeAttributes$Companion r6 = kotlin.reflect.jvm.internal.impl.types.TypeAttributes.Companion
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeAttributes r6 = r6.getEmpty()
|
||||
kotlin.reflect.jvm.internal.impl.types.SimpleType r6 = kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory.simpleNotNullType(r6, r2, r0)
|
||||
return r6
|
||||
Lcf:
|
||||
return r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor.LazyJavaClassTypeConstructor.getPurelyImplementedSupertype():kotlin.reflect.jvm.internal.impl.types.KotlinType");
|
||||
}
|
||||
|
||||
private final FqName getPurelyImplementsFqNameFromAnnotation() {
|
||||
String value;
|
||||
Annotations annotations = LazyJavaClassDescriptor.this.getAnnotations();
|
||||
FqName PURELY_IMPLEMENTS_ANNOTATION = JvmAnnotationNames.PURELY_IMPLEMENTS_ANNOTATION;
|
||||
Intrinsics.checkNotNullExpressionValue(PURELY_IMPLEMENTS_ANNOTATION, "PURELY_IMPLEMENTS_ANNOTATION");
|
||||
AnnotationDescriptor mo1389findAnnotation = annotations.mo1389findAnnotation(PURELY_IMPLEMENTS_ANNOTATION);
|
||||
if (mo1389findAnnotation == null) {
|
||||
return null;
|
||||
}
|
||||
Object singleOrNull = CollectionsKt.singleOrNull(mo1389findAnnotation.getAllValueArguments().values());
|
||||
StringValue stringValue = singleOrNull instanceof StringValue ? (StringValue) singleOrNull : null;
|
||||
if (stringValue == null || (value = stringValue.getValue()) == null || !FqNamesUtilKt.isValidJavaFqName(value)) {
|
||||
return null;
|
||||
}
|
||||
return new FqName(value);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.AbstractTypeConstructor
|
||||
public Collection<KotlinType> computeSupertypes() {
|
||||
int collectionSizeOrDefault;
|
||||
Collection<JavaClassifierType> supertypes = LazyJavaClassDescriptor.this.getJClass().getSupertypes();
|
||||
ArrayList arrayList = new ArrayList(supertypes.size());
|
||||
ArrayList arrayList2 = new ArrayList(0);
|
||||
KotlinType purelyImplementedSupertype = getPurelyImplementedSupertype();
|
||||
Iterator<JavaClassifierType> it = supertypes.iterator();
|
||||
while (true) {
|
||||
if (!it.hasNext()) {
|
||||
break;
|
||||
}
|
||||
JavaClassifierType next = it.next();
|
||||
KotlinType enhanceSuperType = LazyJavaClassDescriptor.this.f7130c.getComponents().getSignatureEnhancement().enhanceSuperType(LazyJavaClassDescriptor.this.f7130c.getTypeResolver().transformJavaType(next, JavaTypeAttributesKt.toAttributes$default(TypeUsage.SUPERTYPE, false, false, null, 7, null)), LazyJavaClassDescriptor.this.f7130c);
|
||||
if (enhanceSuperType.getConstructor().mo1394getDeclarationDescriptor() instanceof NotFoundClasses.MockClassDescriptor) {
|
||||
arrayList2.add(next);
|
||||
}
|
||||
if (!Intrinsics.areEqual(enhanceSuperType.getConstructor(), purelyImplementedSupertype != null ? purelyImplementedSupertype.getConstructor() : null) && !KotlinBuiltIns.isAnyOrNullableAny(enhanceSuperType)) {
|
||||
arrayList.add(enhanceSuperType);
|
||||
}
|
||||
}
|
||||
ClassDescriptor classDescriptor = LazyJavaClassDescriptor.this.additionalSupertypeClassDescriptor;
|
||||
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(arrayList, classDescriptor != null ? MappingUtilKt.createMappedTypeParametersSubstitution(classDescriptor, LazyJavaClassDescriptor.this).buildSubstitutor().substitute(classDescriptor.getDefaultType(), Variance.INVARIANT) : null);
|
||||
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(arrayList, purelyImplementedSupertype);
|
||||
if (!arrayList2.isEmpty()) {
|
||||
ErrorReporter errorReporter = LazyJavaClassDescriptor.this.f7130c.getComponents().getErrorReporter();
|
||||
ClassDescriptor mo1394getDeclarationDescriptor = mo1394getDeclarationDescriptor();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList2, 10);
|
||||
ArrayList arrayList3 = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator it2 = arrayList2.iterator();
|
||||
while (it2.hasNext()) {
|
||||
JavaType javaType = (JavaType) it2.next();
|
||||
Intrinsics.checkNotNull(javaType, "null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.JavaClassifierType");
|
||||
arrayList3.add(((JavaClassifierType) javaType).getPresentableText());
|
||||
}
|
||||
errorReporter.reportIncompleteHierarchy(mo1394getDeclarationDescriptor, arrayList3);
|
||||
}
|
||||
return !arrayList.isEmpty() ? CollectionsKt.toList(arrayList) : CollectionsKt.listOf(LazyJavaClassDescriptor.this.f7130c.getModule().getBuiltIns().getAnyType());
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
|
||||
public List<TypeParameterDescriptor> getParameters() {
|
||||
return this.parameters.invoke();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.AbstractTypeConstructor
|
||||
public SupertypeLoopChecker getSupertypeLoopChecker() {
|
||||
return LazyJavaClassDescriptor.this.f7130c.getComponents().getSupertypeLoopChecker();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
|
||||
public boolean isDenotable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String asString = LazyJavaClassDescriptor.this.getName().asString();
|
||||
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
|
||||
return asString;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.AbstractClassTypeConstructor, kotlin.reflect.jvm.internal.impl.types.ClassifierBasedTypeConstructor, kotlin.reflect.jvm.internal.impl.types.TypeConstructor
|
||||
/* renamed from: getDeclarationDescriptor */
|
||||
public ClassDescriptor mo1394getDeclarationDescriptor() {
|
||||
return LazyJavaClassDescriptor.this;
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ LazyJavaClassDescriptor(LazyJavaResolverContext lazyJavaResolverContext, DeclarationDescriptor declarationDescriptor, JavaClass javaClass, ClassDescriptor classDescriptor, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(lazyJavaResolverContext, declarationDescriptor, javaClass, (i & 8) != 0 ? null : classDescriptor);
|
||||
}
|
||||
|
||||
public final LazyJavaClassDescriptor copy$descriptors_jvm(JavaResolverCache javaResolverCache, ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(javaResolverCache, "javaResolverCache");
|
||||
LazyJavaResolverContext lazyJavaResolverContext = this.f7130c;
|
||||
LazyJavaResolverContext replaceComponents = ContextKt.replaceComponents(lazyJavaResolverContext, lazyJavaResolverContext.getComponents().replace(javaResolverCache));
|
||||
DeclarationDescriptor containingDeclaration = getContainingDeclaration();
|
||||
Intrinsics.checkNotNullExpressionValue(containingDeclaration, "getContainingDeclaration(...)");
|
||||
return new LazyJavaClassDescriptor(replaceComponents, containingDeclaration, this.jClass, classDescriptor);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated
|
||||
public Annotations getAnnotations() {
|
||||
return this.annotations;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
/* renamed from: getCompanionObjectDescriptor */
|
||||
public ClassDescriptor mo1387getCompanionObjectDescriptor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters
|
||||
public List<TypeParameterDescriptor> getDeclaredTypeParameters() {
|
||||
return this.declaredParameters.invoke();
|
||||
}
|
||||
|
||||
public final JavaClass getJClass() {
|
||||
return this.jClass;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public ClassKind getKind() {
|
||||
return this.kind;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public Modality getModality() {
|
||||
return this.modality;
|
||||
}
|
||||
|
||||
public final List<JavaAnnotation> getModuleAnnotations() {
|
||||
return (List) this.moduleAnnotations$delegate.getValue();
|
||||
}
|
||||
|
||||
public final LazyJavaResolverContext getOuterContext() {
|
||||
return this.outerContext;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public Collection<ClassDescriptor> getSealedSubclasses() {
|
||||
if (this.modality != Modality.SEALED) {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
JavaTypeAttributes attributes$default = JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, null, 7, null);
|
||||
Collection<JavaClassifierType> permittedTypes = this.jClass.getPermittedTypes();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<T> it = permittedTypes.iterator();
|
||||
while (it.hasNext()) {
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = this.f7130c.getTypeResolver().transformJavaType((JavaClassifierType) it.next(), attributes$default).getConstructor().mo1394getDeclarationDescriptor();
|
||||
ClassDescriptor classDescriptor = mo1394getDeclarationDescriptor instanceof ClassDescriptor ? (ClassDescriptor) mo1394getDeclarationDescriptor : null;
|
||||
if (classDescriptor != null) {
|
||||
arrayList.add(classDescriptor);
|
||||
}
|
||||
}
|
||||
return CollectionsKt.sortedWith(arrayList, new Comparator() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor$getSealedSubclasses$$inlined$sortedBy$1
|
||||
@Override // java.util.Comparator
|
||||
public final int compare(T t2, T t4) {
|
||||
return ComparisonsKt.compareValues(DescriptorUtilsKt.getFqNameSafe((ClassDescriptor) t2).asString(), DescriptorUtilsKt.getFqNameSafe((ClassDescriptor) t4).asString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public MemberScope getStaticScope() {
|
||||
return this.staticScope;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
public TypeConstructor getTypeConstructor() {
|
||||
return this.typeConstructor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public MemberScope getUnsubstitutedInnerClassesScope() {
|
||||
return this.innerClassesScope;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
/* renamed from: getUnsubstitutedPrimaryConstructor */
|
||||
public ClassConstructorDescriptor mo1388getUnsubstitutedPrimaryConstructor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public ValueClassRepresentation<SimpleType> getValueClassRepresentation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithVisibility, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public DescriptorVisibility getVisibility() {
|
||||
if (!Intrinsics.areEqual(this.visibility, DescriptorVisibilities.PRIVATE) || this.jClass.getOuterClass() != null) {
|
||||
return UtilsKt.toDescriptorVisibility(this.visibility);
|
||||
}
|
||||
DescriptorVisibility descriptorVisibility = JavaDescriptorVisibilities.PACKAGE_VISIBILITY;
|
||||
Intrinsics.checkNotNull(descriptorVisibility);
|
||||
return descriptorVisibility;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public boolean isActual() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isCompanionObject() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isData() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public boolean isExpect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isFun() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isInline() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters
|
||||
public boolean isInner() {
|
||||
return this.isInner;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Lazy Java class " + DescriptorUtilsKt.getFqNameUnsafe(this);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaClassDescriptor(LazyJavaResolverContext outerContext, DeclarationDescriptor containingDeclaration, JavaClass jClass, ClassDescriptor classDescriptor) {
|
||||
super(outerContext.getStorageManager(), containingDeclaration, jClass.getName(), outerContext.getComponents().getSourceElementFactory().source(jClass), false);
|
||||
ClassKind classKind;
|
||||
Modality modality;
|
||||
Intrinsics.checkNotNullParameter(outerContext, "outerContext");
|
||||
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
|
||||
Intrinsics.checkNotNullParameter(jClass, "jClass");
|
||||
this.outerContext = outerContext;
|
||||
this.jClass = jClass;
|
||||
this.additionalSupertypeClassDescriptor = classDescriptor;
|
||||
LazyJavaResolverContext childForClassOrPackage$default = ContextKt.childForClassOrPackage$default(outerContext, this, jClass, 0, 4, null);
|
||||
this.f7130c = childForClassOrPackage$default;
|
||||
childForClassOrPackage$default.getComponents().getJavaResolverCache().recordClass(jClass, this);
|
||||
jClass.getLightClassOriginKind();
|
||||
this.moduleAnnotations$delegate = LazyKt.lazy(new Function0<List<? extends JavaAnnotation>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor$moduleAnnotations$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final List<? extends JavaAnnotation> invoke() {
|
||||
ClassId classId = DescriptorUtilsKt.getClassId(LazyJavaClassDescriptor.this);
|
||||
if (classId != null) {
|
||||
return LazyJavaClassDescriptor.this.getOuterContext().getComponents().getJavaModuleResolver().getAnnotationsForModuleOwnerOfClass(classId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
if (jClass.isAnnotationType()) {
|
||||
classKind = ClassKind.ANNOTATION_CLASS;
|
||||
} else if (jClass.isInterface()) {
|
||||
classKind = ClassKind.INTERFACE;
|
||||
} else {
|
||||
classKind = jClass.isEnum() ? ClassKind.ENUM_CLASS : ClassKind.CLASS;
|
||||
}
|
||||
this.kind = classKind;
|
||||
if (!jClass.isAnnotationType() && !jClass.isEnum()) {
|
||||
modality = Modality.Companion.convertFromFlags(jClass.isSealed(), jClass.isSealed() || jClass.isAbstract() || jClass.isInterface(), !jClass.isFinal());
|
||||
} else {
|
||||
modality = Modality.FINAL;
|
||||
}
|
||||
this.modality = modality;
|
||||
this.visibility = jClass.getVisibility();
|
||||
this.isInner = (jClass.getOuterClass() == null || jClass.isStatic()) ? false : true;
|
||||
this.typeConstructor = new LazyJavaClassTypeConstructor();
|
||||
LazyJavaClassMemberScope lazyJavaClassMemberScope = new LazyJavaClassMemberScope(childForClassOrPackage$default, this, jClass, classDescriptor != null, null, 16, null);
|
||||
this.unsubstitutedMemberScope = lazyJavaClassMemberScope;
|
||||
this.scopeHolder = ScopesHolderForClass.Companion.create(this, childForClassOrPackage$default.getStorageManager(), childForClassOrPackage$default.getComponents().getKotlinTypeChecker().getKotlinTypeRefiner(), new Function1<KotlinTypeRefiner, LazyJavaClassMemberScope>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor$scopeHolder$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final LazyJavaClassMemberScope invoke(KotlinTypeRefiner it) {
|
||||
LazyJavaClassMemberScope lazyJavaClassMemberScope2;
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
LazyJavaResolverContext lazyJavaResolverContext = LazyJavaClassDescriptor.this.f7130c;
|
||||
LazyJavaClassDescriptor lazyJavaClassDescriptor = LazyJavaClassDescriptor.this;
|
||||
JavaClass jClass2 = lazyJavaClassDescriptor.getJClass();
|
||||
boolean z3 = LazyJavaClassDescriptor.this.additionalSupertypeClassDescriptor != null;
|
||||
lazyJavaClassMemberScope2 = LazyJavaClassDescriptor.this.unsubstitutedMemberScope;
|
||||
return new LazyJavaClassMemberScope(lazyJavaResolverContext, lazyJavaClassDescriptor, jClass2, z3, lazyJavaClassMemberScope2);
|
||||
}
|
||||
});
|
||||
this.innerClassesScope = new InnerClassesScopeWrapper(lazyJavaClassMemberScope);
|
||||
this.staticScope = new LazyJavaStaticClassScope(childForClassOrPackage$default, jClass, this);
|
||||
this.annotations = LazyJavaAnnotationsKt.resolveAnnotations(childForClassOrPackage$default, jClass);
|
||||
this.declaredParameters = childForClassOrPackage$default.getStorageManager().createLazyValue(new Function0<List<? extends TypeParameterDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor$declaredParameters$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final List<? extends TypeParameterDescriptor> invoke() {
|
||||
int collectionSizeOrDefault;
|
||||
List<JavaTypeParameter> typeParameters = LazyJavaClassDescriptor.this.getJClass().getTypeParameters();
|
||||
LazyJavaClassDescriptor lazyJavaClassDescriptor = LazyJavaClassDescriptor.this;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(typeParameters, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (JavaTypeParameter javaTypeParameter : typeParameters) {
|
||||
TypeParameterDescriptor resolveTypeParameter = lazyJavaClassDescriptor.f7130c.getTypeParameterResolver().resolveTypeParameter(javaTypeParameter);
|
||||
if (resolveTypeParameter != null) {
|
||||
arrayList.add(resolveTypeParameter);
|
||||
} else {
|
||||
throw new AssertionError("Parameter " + javaTypeParameter + " surely belongs to class " + lazyJavaClassDescriptor.getJClass() + ", so it must be resolved");
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public List<ClassConstructorDescriptor> getConstructors() {
|
||||
return this.unsubstitutedMemberScope.getConstructors$descriptors_jvm().invoke();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.ModuleAwareClassDescriptor
|
||||
public LazyJavaClassMemberScope getUnsubstitutedMemberScope(KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
|
||||
return this.scopeHolder.getScope(kotlinTypeRefiner);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public LazyJavaClassMemberScope getUnsubstitutedMemberScope() {
|
||||
MemberScope unsubstitutedMemberScope = super.getUnsubstitutedMemberScope();
|
||||
Intrinsics.checkNotNull(unsubstitutedMemberScope, "null cannot be cast to non-null type org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassMemberScope");
|
||||
return (LazyJavaClassMemberScope) unsubstitutedMemberScope;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReference;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KDeclarationContainer;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class LazyJavaClassMemberScope$computeNonDeclaredFunctions$3 extends FunctionReference implements Function1<Name, Collection<? extends SimpleFunctionDescriptor>> {
|
||||
public LazyJavaClassMemberScope$computeNonDeclaredFunctions$3(Object obj) {
|
||||
super(1, obj);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
|
||||
public final String getName() {
|
||||
return "searchMethodsByNameWithoutBuiltinMagic";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final KDeclarationContainer getOwner() {
|
||||
return Reflection.getOrCreateKotlinClass(LazyJavaClassMemberScope.class);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final String getSignature() {
|
||||
return "searchMethodsByNameWithoutBuiltinMagic(Lorg/jetbrains/kotlin/name/Name;)Ljava/util/Collection;";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<SimpleFunctionDescriptor> invoke(Name p02) {
|
||||
Collection<SimpleFunctionDescriptor> searchMethodsByNameWithoutBuiltinMagic;
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
searchMethodsByNameWithoutBuiltinMagic = ((LazyJavaClassMemberScope) this.receiver).searchMethodsByNameWithoutBuiltinMagic(p02);
|
||||
return searchMethodsByNameWithoutBuiltinMagic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReference;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KDeclarationContainer;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class LazyJavaClassMemberScope$computeNonDeclaredFunctions$4 extends FunctionReference implements Function1<Name, Collection<? extends SimpleFunctionDescriptor>> {
|
||||
public LazyJavaClassMemberScope$computeNonDeclaredFunctions$4(Object obj) {
|
||||
super(1, obj);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
|
||||
public final String getName() {
|
||||
return "searchMethodsInSupertypesWithoutBuiltinMagic";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final KDeclarationContainer getOwner() {
|
||||
return Reflection.getOrCreateKotlinClass(LazyJavaClassMemberScope.class);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final String getSignature() {
|
||||
return "searchMethodsInSupertypesWithoutBuiltinMagic(Lorg/jetbrains/kotlin/name/Name;)Ljava/util/Collection;";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<SimpleFunctionDescriptor> invoke(Name p02) {
|
||||
Collection<SimpleFunctionDescriptor> searchMethodsInSupertypesWithoutBuiltinMagic;
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
searchMethodsInSupertypesWithoutBuiltinMagic = ((LazyJavaClassMemberScope) this.receiver).searchMethodsInSupertypesWithoutBuiltinMagic(p02);
|
||||
return searchMethodsInSupertypesWithoutBuiltinMagic;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,201 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PackageFragmentDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.ContextKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotationsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinderKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryPackageSourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.PackagePartProvider;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.header.KotlinClassHeader;
|
||||
import kotlin.reflect.jvm.internal.impl.metadata.jvm.deserialization.JvmMetadataVersion;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmClassName;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.DeserializationHelpersKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaPackageFragment extends PackageFragmentDescriptorImpl {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaPackageFragment.class), "binaryClasses", "getBinaryClasses$descriptors_jvm()Ljava/util/Map;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaPackageFragment.class), "partToFacade", "getPartToFacade()Ljava/util/HashMap;"))};
|
||||
private final Annotations annotations;
|
||||
private final NotNullLazyValue binaryClasses$delegate;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7131c;
|
||||
private final JavaPackage jPackage;
|
||||
private final JvmMetadataVersion jvmMetadataVersion;
|
||||
private final NotNullLazyValue partToFacade$delegate;
|
||||
private final JvmPackageScope scope;
|
||||
private final NotNullLazyValue<List<FqName>> subPackages;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaPackageFragment(LazyJavaResolverContext outerContext, JavaPackage jPackage) {
|
||||
super(outerContext.getModule(), jPackage.getFqName());
|
||||
Intrinsics.checkNotNullParameter(outerContext, "outerContext");
|
||||
Intrinsics.checkNotNullParameter(jPackage, "jPackage");
|
||||
this.jPackage = jPackage;
|
||||
LazyJavaResolverContext childForClassOrPackage$default = ContextKt.childForClassOrPackage$default(outerContext, this, null, 0, 6, null);
|
||||
this.f7131c = childForClassOrPackage$default;
|
||||
this.jvmMetadataVersion = DeserializationHelpersKt.jvmMetadataVersionOrDefault(outerContext.getComponents().getDeserializedDescriptorResolver().getComponents().getConfiguration());
|
||||
this.binaryClasses$delegate = childForClassOrPackage$default.getStorageManager().createLazyValue(new Function0<Map<String, ? extends KotlinJvmBinaryClass>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageFragment$binaryClasses$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Map<String, ? extends KotlinJvmBinaryClass> invoke() {
|
||||
LazyJavaResolverContext lazyJavaResolverContext;
|
||||
LazyJavaResolverContext lazyJavaResolverContext2;
|
||||
JvmMetadataVersion jvmMetadataVersion;
|
||||
lazyJavaResolverContext = LazyJavaPackageFragment.this.f7131c;
|
||||
PackagePartProvider packagePartProvider = lazyJavaResolverContext.getComponents().getPackagePartProvider();
|
||||
String asString = LazyJavaPackageFragment.this.getFqName().asString();
|
||||
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
|
||||
List<String> findPackageParts = packagePartProvider.findPackageParts(asString);
|
||||
LazyJavaPackageFragment lazyJavaPackageFragment = LazyJavaPackageFragment.this;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (String str : findPackageParts) {
|
||||
ClassId classId = ClassId.topLevel(JvmClassName.byInternalName(str).getFqNameForTopLevelClassMaybeWithDollars());
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
lazyJavaResolverContext2 = lazyJavaPackageFragment.f7131c;
|
||||
KotlinClassFinder kotlinClassFinder = lazyJavaResolverContext2.getComponents().getKotlinClassFinder();
|
||||
jvmMetadataVersion = lazyJavaPackageFragment.jvmMetadataVersion;
|
||||
KotlinJvmBinaryClass findKotlinClass = KotlinClassFinderKt.findKotlinClass(kotlinClassFinder, classId, jvmMetadataVersion);
|
||||
Pair pair = findKotlinClass != null ? TuplesKt.to(str, findKotlinClass) : null;
|
||||
if (pair != null) {
|
||||
arrayList.add(pair);
|
||||
}
|
||||
}
|
||||
return MapsKt.toMap(arrayList);
|
||||
}
|
||||
});
|
||||
this.scope = new JvmPackageScope(childForClassOrPackage$default, jPackage, this);
|
||||
this.subPackages = childForClassOrPackage$default.getStorageManager().createRecursionTolerantLazyValue(new Function0<List<? extends FqName>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageFragment$subPackages$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final List<? extends FqName> invoke() {
|
||||
JavaPackage javaPackage;
|
||||
int collectionSizeOrDefault;
|
||||
javaPackage = LazyJavaPackageFragment.this.jPackage;
|
||||
Collection<JavaPackage> subPackages = javaPackage.getSubPackages();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(subPackages, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = subPackages.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(((JavaPackage) it.next()).getFqName());
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}, CollectionsKt.emptyList());
|
||||
this.annotations = childForClassOrPackage$default.getComponents().getJavaTypeEnhancementState().getDisabledDefaultAnnotations() ? Annotations.Companion.getEMPTY() : LazyJavaAnnotationsKt.resolveAnnotations(childForClassOrPackage$default, jPackage);
|
||||
this.partToFacade$delegate = childForClassOrPackage$default.getStorageManager().createLazyValue(new Function0<HashMap<JvmClassName, JvmClassName>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageFragment$partToFacade$2
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[KotlinClassHeader.Kind.values().length];
|
||||
try {
|
||||
iArr[KotlinClassHeader.Kind.MULTIFILE_CLASS_PART.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[KotlinClassHeader.Kind.FILE_FACADE.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final HashMap<JvmClassName, JvmClassName> invoke() {
|
||||
HashMap<JvmClassName, JvmClassName> hashMap = new HashMap<>();
|
||||
for (Map.Entry<String, KotlinJvmBinaryClass> entry : LazyJavaPackageFragment.this.getBinaryClasses$descriptors_jvm().entrySet()) {
|
||||
String key = entry.getKey();
|
||||
KotlinJvmBinaryClass value = entry.getValue();
|
||||
JvmClassName byInternalName = JvmClassName.byInternalName(key);
|
||||
Intrinsics.checkNotNullExpressionValue(byInternalName, "byInternalName(...)");
|
||||
KotlinClassHeader classHeader = value.getClassHeader();
|
||||
int i = WhenMappings.$EnumSwitchMapping$0[classHeader.getKind().ordinal()];
|
||||
if (i == 1) {
|
||||
String multifileClassName = classHeader.getMultifileClassName();
|
||||
if (multifileClassName != null) {
|
||||
JvmClassName byInternalName2 = JvmClassName.byInternalName(multifileClassName);
|
||||
Intrinsics.checkNotNullExpressionValue(byInternalName2, "byInternalName(...)");
|
||||
hashMap.put(byInternalName, byInternalName2);
|
||||
}
|
||||
} else if (i == 2) {
|
||||
hashMap.put(byInternalName, byInternalName);
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final ClassDescriptor findClassifierByJavaClass$descriptors_jvm(JavaClass jClass) {
|
||||
Intrinsics.checkNotNullParameter(jClass, "jClass");
|
||||
return this.scope.getJavaScope$descriptors_jvm().findClassifierByJavaClass$descriptors_jvm(jClass);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotatedImpl, kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated
|
||||
public Annotations getAnnotations() {
|
||||
return this.annotations;
|
||||
}
|
||||
|
||||
public final Map<String, KotlinJvmBinaryClass> getBinaryClasses$descriptors_jvm() {
|
||||
return (Map) StorageKt.getValue(this.binaryClasses$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PackageFragmentDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.DeclarationDescriptorNonRootImpl, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithSource
|
||||
public SourceElement getSource() {
|
||||
return new KotlinJvmBinaryPackageSourceElement(this);
|
||||
}
|
||||
|
||||
public final List<FqName> getSubPackageFqNames$descriptors_jvm() {
|
||||
return this.subPackages.invoke();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.PackageFragmentDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.DeclarationDescriptorImpl
|
||||
public String toString() {
|
||||
return "Lazy Java package fragment: " + getFqName() + " of module " + this.f7131c.getComponents().getModule();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor
|
||||
public JvmPackageScope getMemberScope() {
|
||||
return this.scope;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JavaClassFinder;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.DeclaredMemberIndex;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageScope;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPackage;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.LightClassOriginKind;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinderKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.header.KotlinClassHeader;
|
||||
import kotlin.reflect.jvm.internal.impl.metadata.jvm.deserialization.JvmMetadataVersion;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.name.SpecialNames;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNullable;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NullableLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.DeserializationHelpersKt;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.FunctionsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaPackageScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaPackageScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageScope\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,189:1\n1620#2,3:190\n1611#2:193\n1855#2:194\n1856#2:196\n1612#2:197\n766#2:198\n857#2,2:199\n1#3:195\n*S KotlinDebug\n*F\n+ 1 LazyJavaPackageScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageScope\n*L\n160#1:190,3\n162#1:193\n162#1:194\n162#1:196\n162#1:197\n185#1:198\n185#1:199,2\n162#1:195\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaPackageScope extends LazyJavaStaticScope {
|
||||
private final MemoizedFunctionToNullable<FindClassRequest, ClassDescriptor> classes;
|
||||
private final JavaPackage jPackage;
|
||||
private final NullableLazyValue<Set<String>> knownClassNamesInPackage;
|
||||
private final LazyJavaPackageFragment ownerDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class FindClassRequest {
|
||||
private final JavaClass javaClass;
|
||||
private final Name name;
|
||||
|
||||
public FindClassRequest(Name name, JavaClass javaClass) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
this.name = name;
|
||||
this.javaClass = javaClass;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
return (obj instanceof FindClassRequest) && Intrinsics.areEqual(this.name, ((FindClassRequest) obj).name);
|
||||
}
|
||||
|
||||
public final JavaClass getJavaClass() {
|
||||
return this.javaClass;
|
||||
}
|
||||
|
||||
public final Name getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.name.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class KotlinClassLookupResult {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Found extends KotlinClassLookupResult {
|
||||
private final ClassDescriptor descriptor;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public Found(ClassDescriptor descriptor) {
|
||||
super(null);
|
||||
Intrinsics.checkNotNullParameter(descriptor, "descriptor");
|
||||
this.descriptor = descriptor;
|
||||
}
|
||||
|
||||
public final ClassDescriptor getDescriptor() {
|
||||
return this.descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class NotFound extends KotlinClassLookupResult {
|
||||
public static final NotFound INSTANCE = new NotFound();
|
||||
|
||||
private NotFound() {
|
||||
super(null);
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class SyntheticClass extends KotlinClassLookupResult {
|
||||
public static final SyntheticClass INSTANCE = new SyntheticClass();
|
||||
|
||||
private SyntheticClass() {
|
||||
super(null);
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ KotlinClassLookupResult(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private KotlinClassLookupResult() {
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaPackageScope(final LazyJavaResolverContext c4, JavaPackage jPackage, LazyJavaPackageFragment ownerDescriptor) {
|
||||
super(c4);
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(jPackage, "jPackage");
|
||||
Intrinsics.checkNotNullParameter(ownerDescriptor, "ownerDescriptor");
|
||||
this.jPackage = jPackage;
|
||||
this.ownerDescriptor = ownerDescriptor;
|
||||
this.knownClassNamesInPackage = c4.getStorageManager().createNullableLazyValue(new Function0<Set<? extends String>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageScope$knownClassNamesInPackage$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Set<? extends String> invoke() {
|
||||
return LazyJavaResolverContext.this.getComponents().getFinder().knownClassNamesInPackage(this.getOwnerDescriptor().getFqName());
|
||||
}
|
||||
});
|
||||
this.classes = c4.getStorageManager().createMemoizedFunctionWithNullableValues(new Function1<FindClassRequest, ClassDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaPackageScope$classes$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final ClassDescriptor invoke(LazyJavaPackageScope.FindClassRequest request) {
|
||||
JvmMetadataVersion jvmMetadataVersion;
|
||||
KotlinClassFinder.Result findKotlinClassOrContent;
|
||||
LazyJavaPackageScope.KotlinClassLookupResult resolveKotlinBinaryClass;
|
||||
JvmMetadataVersion jvmMetadataVersion2;
|
||||
JvmMetadataVersion jvmMetadataVersion3;
|
||||
JvmMetadataVersion jvmMetadataVersion4;
|
||||
Intrinsics.checkNotNullParameter(request, "request");
|
||||
ClassId classId = new ClassId(LazyJavaPackageScope.this.getOwnerDescriptor().getFqName(), request.getName());
|
||||
if (request.getJavaClass() != null) {
|
||||
KotlinClassFinder kotlinClassFinder = c4.getComponents().getKotlinClassFinder();
|
||||
JavaClass javaClass = request.getJavaClass();
|
||||
jvmMetadataVersion4 = LazyJavaPackageScope.this.getJvmMetadataVersion();
|
||||
findKotlinClassOrContent = kotlinClassFinder.findKotlinClassOrContent(javaClass, jvmMetadataVersion4);
|
||||
} else {
|
||||
KotlinClassFinder kotlinClassFinder2 = c4.getComponents().getKotlinClassFinder();
|
||||
jvmMetadataVersion = LazyJavaPackageScope.this.getJvmMetadataVersion();
|
||||
findKotlinClassOrContent = kotlinClassFinder2.findKotlinClassOrContent(classId, jvmMetadataVersion);
|
||||
}
|
||||
KotlinJvmBinaryClass kotlinJvmBinaryClass = findKotlinClassOrContent != null ? findKotlinClassOrContent.toKotlinJvmBinaryClass() : null;
|
||||
ClassId classId2 = kotlinJvmBinaryClass != null ? kotlinJvmBinaryClass.getClassId() : null;
|
||||
if (classId2 != null && (classId2.isNestedClass() || classId2.isLocal())) {
|
||||
return null;
|
||||
}
|
||||
resolveKotlinBinaryClass = LazyJavaPackageScope.this.resolveKotlinBinaryClass(kotlinJvmBinaryClass);
|
||||
if (resolveKotlinBinaryClass instanceof LazyJavaPackageScope.KotlinClassLookupResult.Found) {
|
||||
return ((LazyJavaPackageScope.KotlinClassLookupResult.Found) resolveKotlinBinaryClass).getDescriptor();
|
||||
}
|
||||
if (resolveKotlinBinaryClass instanceof LazyJavaPackageScope.KotlinClassLookupResult.SyntheticClass) {
|
||||
return null;
|
||||
}
|
||||
if (resolveKotlinBinaryClass instanceof LazyJavaPackageScope.KotlinClassLookupResult.NotFound) {
|
||||
JavaClass javaClass2 = request.getJavaClass();
|
||||
if (javaClass2 == null) {
|
||||
JavaClassFinder finder = c4.getComponents().getFinder();
|
||||
KotlinClassFinder.Result.ClassFileContent classFileContent = findKotlinClassOrContent instanceof KotlinClassFinder.Result.ClassFileContent ? (KotlinClassFinder.Result.ClassFileContent) findKotlinClassOrContent : null;
|
||||
javaClass2 = finder.findClass(new JavaClassFinder.Request(classId, classFileContent != null ? classFileContent.getContent() : null, null, 4, null));
|
||||
}
|
||||
JavaClass javaClass3 = javaClass2;
|
||||
if ((javaClass3 != null ? javaClass3.getLightClassOriginKind() : null) != LightClassOriginKind.BINARY) {
|
||||
FqName fqName = javaClass3 != null ? javaClass3.getFqName() : null;
|
||||
if (fqName == null || fqName.isRoot() || !Intrinsics.areEqual(fqName.parent(), LazyJavaPackageScope.this.getOwnerDescriptor().getFqName())) {
|
||||
return null;
|
||||
}
|
||||
LazyJavaClassDescriptor lazyJavaClassDescriptor = new LazyJavaClassDescriptor(c4, LazyJavaPackageScope.this.getOwnerDescriptor(), javaClass3, null, 8, null);
|
||||
c4.getComponents().getJavaClassesTracker().reportClass(lazyJavaClassDescriptor);
|
||||
return lazyJavaClassDescriptor;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder("Couldn't find kotlin binary class for light class created by kotlin binary file\nJavaClass: ");
|
||||
sb.append(javaClass3);
|
||||
sb.append("\nClassId: ");
|
||||
sb.append(classId);
|
||||
sb.append("\nfindKotlinClass(JavaClass) = ");
|
||||
KotlinClassFinder kotlinClassFinder3 = c4.getComponents().getKotlinClassFinder();
|
||||
jvmMetadataVersion2 = LazyJavaPackageScope.this.getJvmMetadataVersion();
|
||||
sb.append(KotlinClassFinderKt.findKotlinClass(kotlinClassFinder3, javaClass3, jvmMetadataVersion2));
|
||||
sb.append("\nfindKotlinClass(ClassId) = ");
|
||||
KotlinClassFinder kotlinClassFinder4 = c4.getComponents().getKotlinClassFinder();
|
||||
jvmMetadataVersion3 = LazyJavaPackageScope.this.getJvmMetadataVersion();
|
||||
sb.append(KotlinClassFinderKt.findKotlinClass(kotlinClassFinder4, classId, jvmMetadataVersion3));
|
||||
sb.append('\n');
|
||||
throw new IllegalStateException(sb.toString());
|
||||
}
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private final ClassDescriptor findClassifier(Name name, JavaClass javaClass) {
|
||||
if (!SpecialNames.INSTANCE.isSafeIdentifier(name)) {
|
||||
return null;
|
||||
}
|
||||
Set<String> invoke = this.knownClassNamesInPackage.invoke();
|
||||
if (javaClass != null || invoke == null || invoke.contains(name.asString())) {
|
||||
return this.classes.invoke(new FindClassRequest(name, javaClass));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final JvmMetadataVersion getJvmMetadataVersion() {
|
||||
return DeserializationHelpersKt.jvmMetadataVersionOrDefault(getC().getComponents().getDeserializedDescriptorResolver().getComponents().getConfiguration());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final KotlinClassLookupResult resolveKotlinBinaryClass(KotlinJvmBinaryClass kotlinJvmBinaryClass) {
|
||||
if (kotlinJvmBinaryClass == null) {
|
||||
return KotlinClassLookupResult.NotFound.INSTANCE;
|
||||
}
|
||||
if (kotlinJvmBinaryClass.getClassHeader().getKind() != KotlinClassHeader.Kind.CLASS) {
|
||||
return KotlinClassLookupResult.SyntheticClass.INSTANCE;
|
||||
}
|
||||
ClassDescriptor resolveClass = getC().getComponents().getDeserializedDescriptorResolver().resolveClass(kotlinJvmBinaryClass);
|
||||
return resolveClass != null ? new KotlinClassLookupResult.Found(resolveClass) : KotlinClassLookupResult.NotFound.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computeClassNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
if (!kindFilter.acceptsKinds(DescriptorKindFilter.Companion.getNON_SINGLETON_CLASSIFIERS_MASK())) {
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
Set<String> invoke = this.knownClassNamesInPackage.invoke();
|
||||
if (invoke != null) {
|
||||
HashSet hashSet = new HashSet();
|
||||
Iterator<T> it = invoke.iterator();
|
||||
while (it.hasNext()) {
|
||||
hashSet.add(Name.identifier((String) it.next()));
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
JavaPackage javaPackage = this.jPackage;
|
||||
if (function1 == null) {
|
||||
function1 = FunctionsKt.alwaysTrue();
|
||||
}
|
||||
Collection<JavaClass> classes = javaPackage.getClasses(function1);
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
for (JavaClass javaClass : classes) {
|
||||
Name name = javaClass.getLightClassOriginKind() == LightClassOriginKind.SOURCE ? null : javaClass.getName();
|
||||
if (name != null) {
|
||||
linkedHashSet.add(name);
|
||||
}
|
||||
}
|
||||
return linkedHashSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computeFunctionNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public DeclaredMemberIndex computeMemberIndex() {
|
||||
return DeclaredMemberIndex.Empty.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public void computeNonDeclaredFunctions(Collection<SimpleFunctionDescriptor> result, Name name) {
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computePropertyNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
public final ClassDescriptor findClassifierByJavaClass$descriptors_jvm(JavaClass javaClass) {
|
||||
Intrinsics.checkNotNullParameter(javaClass, "javaClass");
|
||||
return findClassifier(javaClass.getName(), javaClass);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
DescriptorKindFilter.Companion companion = DescriptorKindFilter.Companion;
|
||||
if (!kindFilter.acceptsKinds(companion.getNON_SINGLETON_CLASSIFIERS_MASK() | companion.getCLASSIFIERS_MASK())) {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
Collection<DeclarationDescriptor> invoke = getAllDescriptors().invoke();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Object obj : invoke) {
|
||||
DeclarationDescriptor declarationDescriptor = (DeclarationDescriptor) obj;
|
||||
if (declarationDescriptor instanceof ClassDescriptor) {
|
||||
Name name = ((ClassDescriptor) declarationDescriptor).getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
if (nameFilter.invoke(name).booleanValue()) {
|
||||
arrayList.add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
/* renamed from: getContributedClassifier */
|
||||
public ClassDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
return findClassifier(name, null);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public LazyJavaPackageFragment getOwnerDescriptor() {
|
||||
return this.ownerDescriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,642 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import C.w;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.IndexedValue;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference1Impl;
|
||||
import kotlin.jvm.internal.Ref;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.VariableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.UtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaMethodDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaPropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.ContextKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotationsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaArrayType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaField;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMethod;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaValueParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureMappingKt;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindExclude;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNotNull;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNullable;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.NullableLazyValue;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUtils;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,408:1\n1477#2:409\n1502#2,3:410\n1505#2,3:420\n1549#2:423\n1620#2,3:424\n1549#2:427\n1620#2,3:428\n372#3,7:413\n1#4:431\n*S KotlinDebug\n*F\n+ 1 LazyJavaScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope\n*L\n129#1:409\n129#1:410,3\n129#1:420,3\n165#1:423\n165#1:424,3\n212#1:427\n212#1:428,3\n129#1:413,7\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class LazyJavaScope extends MemberScopeImpl {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaScope.class), "functionNamesLazy", "getFunctionNamesLazy()Ljava/util/Set;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaScope.class), "propertyNamesLazy", "getPropertyNamesLazy()Ljava/util/Set;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(LazyJavaScope.class), "classNamesLazy", "getClassNamesLazy()Ljava/util/Set;"))};
|
||||
private final NotNullLazyValue<Collection<DeclarationDescriptor>> allDescriptors;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7132c;
|
||||
private final NotNullLazyValue classNamesLazy$delegate;
|
||||
private final MemoizedFunctionToNullable<Name, PropertyDescriptor> declaredField;
|
||||
private final MemoizedFunctionToNotNull<Name, Collection<SimpleFunctionDescriptor>> declaredFunctions;
|
||||
private final NotNullLazyValue<DeclaredMemberIndex> declaredMemberIndex;
|
||||
private final NotNullLazyValue functionNamesLazy$delegate;
|
||||
private final MemoizedFunctionToNotNull<Name, Collection<SimpleFunctionDescriptor>> functions;
|
||||
private final LazyJavaScope mainScope;
|
||||
private final MemoizedFunctionToNotNull<Name, List<PropertyDescriptor>> properties;
|
||||
private final NotNullLazyValue propertyNamesLazy$delegate;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class MethodSignatureData {
|
||||
private final List<String> errors;
|
||||
private final boolean hasStableParameterNames;
|
||||
private final KotlinType receiverType;
|
||||
private final KotlinType returnType;
|
||||
private final List<TypeParameterDescriptor> typeParameters;
|
||||
private final List<ValueParameterDescriptor> valueParameters;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public MethodSignatureData(KotlinType returnType, KotlinType kotlinType, List<? extends ValueParameterDescriptor> valueParameters, List<? extends TypeParameterDescriptor> typeParameters, boolean z3, List<String> errors) {
|
||||
Intrinsics.checkNotNullParameter(returnType, "returnType");
|
||||
Intrinsics.checkNotNullParameter(valueParameters, "valueParameters");
|
||||
Intrinsics.checkNotNullParameter(typeParameters, "typeParameters");
|
||||
Intrinsics.checkNotNullParameter(errors, "errors");
|
||||
this.returnType = returnType;
|
||||
this.receiverType = kotlinType;
|
||||
this.valueParameters = valueParameters;
|
||||
this.typeParameters = typeParameters;
|
||||
this.hasStableParameterNames = z3;
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof MethodSignatureData)) {
|
||||
return false;
|
||||
}
|
||||
MethodSignatureData methodSignatureData = (MethodSignatureData) obj;
|
||||
return Intrinsics.areEqual(this.returnType, methodSignatureData.returnType) && Intrinsics.areEqual(this.receiverType, methodSignatureData.receiverType) && Intrinsics.areEqual(this.valueParameters, methodSignatureData.valueParameters) && Intrinsics.areEqual(this.typeParameters, methodSignatureData.typeParameters) && this.hasStableParameterNames == methodSignatureData.hasStableParameterNames && Intrinsics.areEqual(this.errors, methodSignatureData.errors);
|
||||
}
|
||||
|
||||
public final List<String> getErrors() {
|
||||
return this.errors;
|
||||
}
|
||||
|
||||
public final boolean getHasStableParameterNames() {
|
||||
return this.hasStableParameterNames;
|
||||
}
|
||||
|
||||
public final KotlinType getReceiverType() {
|
||||
return this.receiverType;
|
||||
}
|
||||
|
||||
public final KotlinType getReturnType() {
|
||||
return this.returnType;
|
||||
}
|
||||
|
||||
public final List<TypeParameterDescriptor> getTypeParameters() {
|
||||
return this.typeParameters;
|
||||
}
|
||||
|
||||
public final List<ValueParameterDescriptor> getValueParameters() {
|
||||
return this.valueParameters;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int hashCode = this.returnType.hashCode() * 31;
|
||||
KotlinType kotlinType = this.receiverType;
|
||||
return this.errors.hashCode() + w.c((this.typeParameters.hashCode() + ((this.valueParameters.hashCode() + ((hashCode + (kotlinType == null ? 0 : kotlinType.hashCode())) * 31)) * 31)) * 31, 31, this.hasStableParameterNames);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("MethodSignatureData(returnType=");
|
||||
sb.append(this.returnType);
|
||||
sb.append(", receiverType=");
|
||||
sb.append(this.receiverType);
|
||||
sb.append(", valueParameters=");
|
||||
sb.append(this.valueParameters);
|
||||
sb.append(", typeParameters=");
|
||||
sb.append(this.typeParameters);
|
||||
sb.append(", hasStableParameterNames=");
|
||||
sb.append(this.hasStableParameterNames);
|
||||
sb.append(", errors=");
|
||||
return a.o(sb, this.errors, ')');
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ResolvedValueParameters {
|
||||
private final List<ValueParameterDescriptor> descriptors;
|
||||
private final boolean hasSynthesizedNames;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ResolvedValueParameters(List<? extends ValueParameterDescriptor> descriptors, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(descriptors, "descriptors");
|
||||
this.descriptors = descriptors;
|
||||
this.hasSynthesizedNames = z3;
|
||||
}
|
||||
|
||||
public final List<ValueParameterDescriptor> getDescriptors() {
|
||||
return this.descriptors;
|
||||
}
|
||||
|
||||
public final boolean getHasSynthesizedNames() {
|
||||
return this.hasSynthesizedNames;
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ LazyJavaScope(LazyJavaResolverContext lazyJavaResolverContext, LazyJavaScope lazyJavaScope, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(lazyJavaResolverContext, (i & 2) != 0 ? null : lazyJavaScope);
|
||||
}
|
||||
|
||||
private final PropertyDescriptorImpl createPropertyDescriptor(JavaField javaField) {
|
||||
JavaPropertyDescriptor create = JavaPropertyDescriptor.create(getOwnerDescriptor(), LazyJavaAnnotationsKt.resolveAnnotations(this.f7132c, javaField), Modality.FINAL, UtilsKt.toDescriptorVisibility(javaField.getVisibility()), !javaField.isFinal(), javaField.getName(), this.f7132c.getComponents().getSourceElementFactory().source(javaField), isFinalStatic(javaField));
|
||||
Intrinsics.checkNotNullExpressionValue(create, "create(...)");
|
||||
return create;
|
||||
}
|
||||
|
||||
private final Set<Name> getClassNamesLazy() {
|
||||
return (Set) StorageKt.getValue(this.classNamesLazy$delegate, this, (KProperty<?>) $$delegatedProperties[2]);
|
||||
}
|
||||
|
||||
private final Set<Name> getFunctionNamesLazy() {
|
||||
return (Set) StorageKt.getValue(this.functionNamesLazy$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
private final Set<Name> getPropertyNamesLazy() {
|
||||
return (Set) StorageKt.getValue(this.propertyNamesLazy$delegate, this, (KProperty<?>) $$delegatedProperties[1]);
|
||||
}
|
||||
|
||||
private final KotlinType getPropertyType(JavaField javaField) {
|
||||
KotlinType transformJavaType = this.f7132c.getTypeResolver().transformJavaType(javaField.getType(), JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, null, 7, null));
|
||||
if ((!KotlinBuiltIns.isPrimitiveType(transformJavaType) && !KotlinBuiltIns.isString(transformJavaType)) || !isFinalStatic(javaField) || !javaField.getHasConstantNotNullInitializer()) {
|
||||
return transformJavaType;
|
||||
}
|
||||
KotlinType makeNotNullable = TypeUtils.makeNotNullable(transformJavaType);
|
||||
Intrinsics.checkNotNullExpressionValue(makeNotNullable, "makeNotNullable(...)");
|
||||
return makeNotNullable;
|
||||
}
|
||||
|
||||
private final boolean isFinalStatic(JavaField javaField) {
|
||||
return javaField.isFinal() && javaField.isStatic();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r1v0, types: [T, kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl] */
|
||||
/* JADX WARN: Type inference failed for: r1v12, types: [T, kotlin.reflect.jvm.internal.impl.descriptors.impl.PropertyDescriptorImpl] */
|
||||
public final PropertyDescriptor resolveProperty(final JavaField javaField) {
|
||||
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
|
||||
?? createPropertyDescriptor = createPropertyDescriptor(javaField);
|
||||
objectRef.element = createPropertyDescriptor;
|
||||
createPropertyDescriptor.initialize(null, null, null, null);
|
||||
((PropertyDescriptorImpl) objectRef.element).setType(getPropertyType(javaField), CollectionsKt.emptyList(), getDispatchReceiverParameter(), null, CollectionsKt.emptyList());
|
||||
DeclarationDescriptor ownerDescriptor = getOwnerDescriptor();
|
||||
ClassDescriptor classDescriptor = ownerDescriptor instanceof ClassDescriptor ? (ClassDescriptor) ownerDescriptor : null;
|
||||
if (classDescriptor != null) {
|
||||
LazyJavaResolverContext lazyJavaResolverContext = this.f7132c;
|
||||
objectRef.element = lazyJavaResolverContext.getComponents().getSyntheticPartsProvider().modifyField(lazyJavaResolverContext, classDescriptor, (PropertyDescriptorImpl) objectRef.element);
|
||||
}
|
||||
T t2 = objectRef.element;
|
||||
if (DescriptorUtils.shouldRecordInitializerForProperty((VariableDescriptor) t2, ((PropertyDescriptorImpl) t2).getType())) {
|
||||
((PropertyDescriptorImpl) objectRef.element).setCompileTimeInitializerFactory(new Function0<NullableLazyValue<? extends ConstantValue<?>>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$resolveProperty$2
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final NullableLazyValue<? extends ConstantValue<?>> invoke() {
|
||||
StorageManager storageManager = LazyJavaScope.this.getC().getStorageManager();
|
||||
final LazyJavaScope lazyJavaScope = LazyJavaScope.this;
|
||||
final JavaField javaField2 = javaField;
|
||||
final Ref.ObjectRef<PropertyDescriptorImpl> objectRef2 = objectRef;
|
||||
return storageManager.createNullableLazyValue(new Function0<ConstantValue<?>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$resolveProperty$2.1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final ConstantValue<?> invoke() {
|
||||
return LazyJavaScope.this.getC().getComponents().getJavaPropertyInitializerEvaluator().getInitializerConstant(javaField2, objectRef2.element);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.f7132c.getComponents().getJavaResolverCache().recordField(javaField, (PropertyDescriptor) objectRef.element);
|
||||
return (PropertyDescriptor) objectRef.element;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void retainMostSpecificMethods(Set<SimpleFunctionDescriptor> set) {
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
for (Object obj : set) {
|
||||
String computeJvmDescriptor$default = MethodSignatureMappingKt.computeJvmDescriptor$default((SimpleFunctionDescriptor) obj, false, false, 2, null);
|
||||
Object obj2 = linkedHashMap.get(computeJvmDescriptor$default);
|
||||
if (obj2 == null) {
|
||||
obj2 = new ArrayList();
|
||||
linkedHashMap.put(computeJvmDescriptor$default, obj2);
|
||||
}
|
||||
((List) obj2).add(obj);
|
||||
}
|
||||
for (List list : linkedHashMap.values()) {
|
||||
if (list.size() != 1) {
|
||||
List list2 = list;
|
||||
Collection<? extends SimpleFunctionDescriptor> selectMostSpecificInEachOverridableGroup = OverridingUtilsKt.selectMostSpecificInEachOverridableGroup(list2, new Function1<SimpleFunctionDescriptor, CallableDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$retainMostSpecificMethods$mostSpecificMethods$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final CallableDescriptor invoke(SimpleFunctionDescriptor selectMostSpecificInEachOverridableGroup2) {
|
||||
Intrinsics.checkNotNullParameter(selectMostSpecificInEachOverridableGroup2, "$this$selectMostSpecificInEachOverridableGroup");
|
||||
return selectMostSpecificInEachOverridableGroup2;
|
||||
}
|
||||
});
|
||||
set.removeAll(list2);
|
||||
set.addAll(selectMostSpecificInEachOverridableGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Set<Name> computeClassNames(DescriptorKindFilter descriptorKindFilter, Function1<? super Name, Boolean> function1);
|
||||
|
||||
public final List<DeclarationDescriptor> computeDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
NoLookupLocation noLookupLocation = NoLookupLocation.WHEN_GET_ALL_DESCRIPTORS;
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.Companion.getCLASSIFIERS_MASK())) {
|
||||
for (Name name : computeClassNames(kindFilter, nameFilter)) {
|
||||
if (nameFilter.invoke(name).booleanValue()) {
|
||||
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(linkedHashSet, mo1396getContributedClassifier(name, noLookupLocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.Companion.getFUNCTIONS_MASK()) && !kindFilter.getExcludes().contains(DescriptorKindExclude.NonExtensions.INSTANCE)) {
|
||||
for (Name name2 : computeFunctionNames(kindFilter, nameFilter)) {
|
||||
if (nameFilter.invoke(name2).booleanValue()) {
|
||||
linkedHashSet.addAll(getContributedFunctions(name2, noLookupLocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.Companion.getVARIABLES_MASK()) && !kindFilter.getExcludes().contains(DescriptorKindExclude.NonExtensions.INSTANCE)) {
|
||||
for (Name name3 : computePropertyNames(kindFilter, nameFilter)) {
|
||||
if (nameFilter.invoke(name3).booleanValue()) {
|
||||
linkedHashSet.addAll(getContributedVariables(name3, noLookupLocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
return CollectionsKt.toList(linkedHashSet);
|
||||
}
|
||||
|
||||
public abstract Set<Name> computeFunctionNames(DescriptorKindFilter descriptorKindFilter, Function1<? super Name, Boolean> function1);
|
||||
|
||||
public void computeImplicitlyDeclaredFunctions(Collection<SimpleFunctionDescriptor> result, Name name) {
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
}
|
||||
|
||||
public abstract DeclaredMemberIndex computeMemberIndex();
|
||||
|
||||
public final KotlinType computeMethodReturnType(JavaMethod method, LazyJavaResolverContext c4) {
|
||||
Intrinsics.checkNotNullParameter(method, "method");
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
return c4.getTypeResolver().transformJavaType(method.getReturnType(), JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, method.getContainingClass().isAnnotationType(), false, null, 6, null));
|
||||
}
|
||||
|
||||
public abstract void computeNonDeclaredFunctions(Collection<SimpleFunctionDescriptor> collection, Name name);
|
||||
|
||||
public abstract void computeNonDeclaredProperties(Name name, Collection<PropertyDescriptor> collection);
|
||||
|
||||
public abstract Set<Name> computePropertyNames(DescriptorKindFilter descriptorKindFilter, Function1<? super Name, Boolean> function1);
|
||||
|
||||
public final NotNullLazyValue<Collection<DeclarationDescriptor>> getAllDescriptors() {
|
||||
return this.allDescriptors;
|
||||
}
|
||||
|
||||
public final LazyJavaResolverContext getC() {
|
||||
return this.f7132c;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getClassifierNames() {
|
||||
return getClassNamesLazy();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
return this.allDescriptors.invoke();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
return !getFunctionNames().contains(name) ? CollectionsKt.emptyList() : this.functions.invoke(name);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
return !getVariableNames().contains(name) ? CollectionsKt.emptyList() : this.properties.invoke(name);
|
||||
}
|
||||
|
||||
public final NotNullLazyValue<DeclaredMemberIndex> getDeclaredMemberIndex() {
|
||||
return this.declaredMemberIndex;
|
||||
}
|
||||
|
||||
public abstract ReceiverParameterDescriptor getDispatchReceiverParameter();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getFunctionNames() {
|
||||
return getFunctionNamesLazy();
|
||||
}
|
||||
|
||||
public final LazyJavaScope getMainScope() {
|
||||
return this.mainScope;
|
||||
}
|
||||
|
||||
public abstract DeclarationDescriptor getOwnerDescriptor();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope
|
||||
public Set<Name> getVariableNames() {
|
||||
return getPropertyNamesLazy();
|
||||
}
|
||||
|
||||
public boolean isVisibleAsFunction(JavaMethodDescriptor javaMethodDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(javaMethodDescriptor, "<this>");
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract MethodSignatureData resolveMethodSignature(JavaMethod javaMethod, List<? extends TypeParameterDescriptor> list, KotlinType kotlinType, List<? extends ValueParameterDescriptor> list2);
|
||||
|
||||
public final JavaMethodDescriptor resolveMethodToFunctionDescriptor(JavaMethod method) {
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(method, "method");
|
||||
JavaMethodDescriptor createJavaMethod = JavaMethodDescriptor.createJavaMethod(getOwnerDescriptor(), LazyJavaAnnotationsKt.resolveAnnotations(this.f7132c, method), method.getName(), this.f7132c.getComponents().getSourceElementFactory().source(method), this.declaredMemberIndex.invoke().findRecordComponentByName(method.getName()) != null && method.getValueParameters().isEmpty());
|
||||
Intrinsics.checkNotNullExpressionValue(createJavaMethod, "createJavaMethod(...)");
|
||||
LazyJavaResolverContext childForMethod$default = ContextKt.childForMethod$default(this.f7132c, createJavaMethod, method, 0, 4, null);
|
||||
List<JavaTypeParameter> typeParameters = method.getTypeParameters();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(typeParameters, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = typeParameters.iterator();
|
||||
while (it.hasNext()) {
|
||||
TypeParameterDescriptor resolveTypeParameter = childForMethod$default.getTypeParameterResolver().resolveTypeParameter((JavaTypeParameter) it.next());
|
||||
Intrinsics.checkNotNull(resolveTypeParameter);
|
||||
arrayList.add(resolveTypeParameter);
|
||||
}
|
||||
ResolvedValueParameters resolveValueParameters = resolveValueParameters(childForMethod$default, createJavaMethod, method.getValueParameters());
|
||||
MethodSignatureData resolveMethodSignature = resolveMethodSignature(method, arrayList, computeMethodReturnType(method, childForMethod$default), resolveValueParameters.getDescriptors());
|
||||
KotlinType receiverType = resolveMethodSignature.getReceiverType();
|
||||
createJavaMethod.initialize(receiverType != null ? DescriptorFactory.createExtensionReceiverParameterForCallable(createJavaMethod, receiverType, Annotations.Companion.getEMPTY()) : null, getDispatchReceiverParameter(), CollectionsKt.emptyList(), resolveMethodSignature.getTypeParameters(), resolveMethodSignature.getValueParameters(), resolveMethodSignature.getReturnType(), Modality.Companion.convertFromFlags(false, method.isAbstract(), true ^ method.isFinal()), UtilsKt.toDescriptorVisibility(method.getVisibility()), resolveMethodSignature.getReceiverType() != null ? MapsKt.mapOf(TuplesKt.to(JavaMethodDescriptor.ORIGINAL_VALUE_PARAMETER_FOR_EXTENSION_RECEIVER, CollectionsKt.first((List) resolveValueParameters.getDescriptors()))) : MapsKt.emptyMap());
|
||||
createJavaMethod.setParameterNamesStatus(resolveMethodSignature.getHasStableParameterNames(), resolveValueParameters.getHasSynthesizedNames());
|
||||
if (!resolveMethodSignature.getErrors().isEmpty()) {
|
||||
childForMethod$default.getComponents().getSignaturePropagator().reportSignatureErrors(createJavaMethod, resolveMethodSignature.getErrors());
|
||||
}
|
||||
return createJavaMethod;
|
||||
}
|
||||
|
||||
public final ResolvedValueParameters resolveValueParameters(LazyJavaResolverContext c4, FunctionDescriptor functionDescriptor, List<? extends JavaValueParameter> jValueParameters) {
|
||||
int collectionSizeOrDefault;
|
||||
Pair pair;
|
||||
Name name;
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
FunctionDescriptor function = functionDescriptor;
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
Intrinsics.checkNotNullParameter(jValueParameters, "jValueParameters");
|
||||
Iterable<IndexedValue> withIndex = CollectionsKt.withIndex(jValueParameters);
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(withIndex, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
boolean z3 = false;
|
||||
for (IndexedValue indexedValue : withIndex) {
|
||||
int index = indexedValue.getIndex();
|
||||
JavaValueParameter javaValueParameter = (JavaValueParameter) indexedValue.component2();
|
||||
Annotations resolveAnnotations = LazyJavaAnnotationsKt.resolveAnnotations(c4, javaValueParameter);
|
||||
JavaTypeAttributes attributes$default = JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, null, 7, null);
|
||||
if (javaValueParameter.isVararg()) {
|
||||
JavaType type = javaValueParameter.getType();
|
||||
JavaArrayType javaArrayType = type instanceof JavaArrayType ? (JavaArrayType) type : null;
|
||||
if (javaArrayType == null) {
|
||||
throw new AssertionError("Vararg parameter should be an array: " + javaValueParameter);
|
||||
}
|
||||
KotlinType transformArrayType = c4.getTypeResolver().transformArrayType(javaArrayType, attributes$default, true);
|
||||
pair = TuplesKt.to(transformArrayType, c4.getModule().getBuiltIns().getArrayElementType(transformArrayType));
|
||||
} else {
|
||||
pair = TuplesKt.to(c4.getTypeResolver().transformJavaType(javaValueParameter.getType(), attributes$default), null);
|
||||
}
|
||||
KotlinType kotlinType = (KotlinType) pair.component1();
|
||||
KotlinType kotlinType2 = (KotlinType) pair.component2();
|
||||
if (Intrinsics.areEqual(function.getName().asString(), "equals") && jValueParameters.size() == 1 && Intrinsics.areEqual(c4.getModule().getBuiltIns().getNullableAnyType(), kotlinType)) {
|
||||
name = Name.identifier("other");
|
||||
} else {
|
||||
name = javaValueParameter.getName();
|
||||
if (name == null) {
|
||||
z3 = true;
|
||||
}
|
||||
if (name == null) {
|
||||
name = Name.identifier("p" + index);
|
||||
Intrinsics.checkNotNullExpressionValue(name, "identifier(...)");
|
||||
}
|
||||
}
|
||||
boolean z4 = z3;
|
||||
Intrinsics.checkNotNull(name);
|
||||
arrayList.add(new ValueParameterDescriptorImpl(function, null, index, resolveAnnotations, name, kotlinType, false, false, false, kotlinType2, c4.getComponents().getSourceElementFactory().source(javaValueParameter)));
|
||||
function = functionDescriptor;
|
||||
z3 = z4;
|
||||
}
|
||||
return new ResolvedValueParameters(CollectionsKt.toList(arrayList), z3);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "Lazy scope for " + getOwnerDescriptor();
|
||||
}
|
||||
|
||||
public LazyJavaScope(LazyJavaResolverContext c4, LazyJavaScope lazyJavaScope) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
this.f7132c = c4;
|
||||
this.mainScope = lazyJavaScope;
|
||||
this.allDescriptors = c4.getStorageManager().createRecursionTolerantLazyValue(new Function0<Collection<? extends DeclarationDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$allDescriptors$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Collection<? extends DeclarationDescriptor> invoke() {
|
||||
return LazyJavaScope.this.computeDescriptors(DescriptorKindFilter.ALL, MemberScope.Companion.getALL_NAME_FILTER());
|
||||
}
|
||||
}, CollectionsKt.emptyList());
|
||||
this.declaredMemberIndex = c4.getStorageManager().createLazyValue(new Function0<DeclaredMemberIndex>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$declaredMemberIndex$1
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final DeclaredMemberIndex invoke() {
|
||||
return LazyJavaScope.this.computeMemberIndex();
|
||||
}
|
||||
});
|
||||
this.declaredFunctions = c4.getStorageManager().createMemoizedFunction(new Function1<Name, Collection<? extends SimpleFunctionDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$declaredFunctions$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<SimpleFunctionDescriptor> invoke(Name name) {
|
||||
MemoizedFunctionToNotNull memoizedFunctionToNotNull;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
if (LazyJavaScope.this.getMainScope() != null) {
|
||||
memoizedFunctionToNotNull = LazyJavaScope.this.getMainScope().declaredFunctions;
|
||||
return (Collection) memoizedFunctionToNotNull.invoke(name);
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (JavaMethod javaMethod : LazyJavaScope.this.getDeclaredMemberIndex().invoke().findMethodsByName(name)) {
|
||||
JavaMethodDescriptor resolveMethodToFunctionDescriptor = LazyJavaScope.this.resolveMethodToFunctionDescriptor(javaMethod);
|
||||
if (LazyJavaScope.this.isVisibleAsFunction(resolveMethodToFunctionDescriptor)) {
|
||||
LazyJavaScope.this.getC().getComponents().getJavaResolverCache().recordMethod(javaMethod, resolveMethodToFunctionDescriptor);
|
||||
arrayList.add(resolveMethodToFunctionDescriptor);
|
||||
}
|
||||
}
|
||||
LazyJavaScope.this.computeImplicitlyDeclaredFunctions(arrayList, name);
|
||||
return arrayList;
|
||||
}
|
||||
});
|
||||
this.declaredField = c4.getStorageManager().createMemoizedFunctionWithNullableValues(new Function1<Name, PropertyDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$declaredField$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final PropertyDescriptor invoke(Name name) {
|
||||
PropertyDescriptor resolveProperty;
|
||||
MemoizedFunctionToNullable memoizedFunctionToNullable;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
if (LazyJavaScope.this.getMainScope() != null) {
|
||||
memoizedFunctionToNullable = LazyJavaScope.this.getMainScope().declaredField;
|
||||
return (PropertyDescriptor) memoizedFunctionToNullable.invoke(name);
|
||||
}
|
||||
JavaField findFieldByName = LazyJavaScope.this.getDeclaredMemberIndex().invoke().findFieldByName(name);
|
||||
if (findFieldByName == null || findFieldByName.isEnumEntry()) {
|
||||
return null;
|
||||
}
|
||||
resolveProperty = LazyJavaScope.this.resolveProperty(findFieldByName);
|
||||
return resolveProperty;
|
||||
}
|
||||
});
|
||||
this.functions = c4.getStorageManager().createMemoizedFunction(new Function1<Name, Collection<? extends SimpleFunctionDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$functions$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<SimpleFunctionDescriptor> invoke(Name name) {
|
||||
MemoizedFunctionToNotNull memoizedFunctionToNotNull;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
memoizedFunctionToNotNull = LazyJavaScope.this.declaredFunctions;
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet((Collection) memoizedFunctionToNotNull.invoke(name));
|
||||
LazyJavaScope.this.retainMostSpecificMethods(linkedHashSet);
|
||||
LazyJavaScope.this.computeNonDeclaredFunctions(linkedHashSet, name);
|
||||
return CollectionsKt.toList(LazyJavaScope.this.getC().getComponents().getSignatureEnhancement().enhanceSignatures(LazyJavaScope.this.getC(), linkedHashSet));
|
||||
}
|
||||
});
|
||||
this.functionNamesLazy$delegate = c4.getStorageManager().createLazyValue(new Function0<Set<? extends Name>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$functionNamesLazy$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Set<? extends Name> invoke() {
|
||||
return LazyJavaScope.this.computeFunctionNames(DescriptorKindFilter.FUNCTIONS, null);
|
||||
}
|
||||
});
|
||||
this.propertyNamesLazy$delegate = c4.getStorageManager().createLazyValue(new Function0<Set<? extends Name>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$propertyNamesLazy$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Set<? extends Name> invoke() {
|
||||
return LazyJavaScope.this.computePropertyNames(DescriptorKindFilter.VARIABLES, null);
|
||||
}
|
||||
});
|
||||
this.classNamesLazy$delegate = c4.getStorageManager().createLazyValue(new Function0<Set<? extends Name>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$classNamesLazy$2
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final Set<? extends Name> invoke() {
|
||||
return LazyJavaScope.this.computeClassNames(DescriptorKindFilter.CLASSIFIERS, null);
|
||||
}
|
||||
});
|
||||
this.properties = c4.getStorageManager().createMemoizedFunction(new Function1<Name, List<? extends PropertyDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope$properties$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final List<PropertyDescriptor> invoke(Name name) {
|
||||
MemoizedFunctionToNullable memoizedFunctionToNullable;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
ArrayList arrayList = new ArrayList();
|
||||
memoizedFunctionToNullable = LazyJavaScope.this.declaredField;
|
||||
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(arrayList, memoizedFunctionToNullable.invoke(name));
|
||||
LazyJavaScope.this.computeNonDeclaredProperties(name, arrayList);
|
||||
if (DescriptorUtils.isAnnotationClass(LazyJavaScope.this.getOwnerDescriptor())) {
|
||||
return CollectionsKt.toList(arrayList);
|
||||
}
|
||||
return CollectionsKt.toList(LazyJavaScope.this.getC().getComponents().getSignatureEnhancement().enhanceSignatures(LazyJavaScope.this.getC(), arrayList));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
|
||||
import kotlin.collections.CollectionsKt___CollectionsKt;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.components.DescriptorResolverUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.JavaClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.descriptors.UtilKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMember;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.DFS;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaStaticClassScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaStaticClassScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticClassScope\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n+ 5 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,171:1\n1#2:172\n1477#3:173\n1502#3,3:174\n1505#3,3:184\n1549#3:193\n1620#3,3:194\n372#4,7:177\n76#5:187\n96#5,5:188\n*S KotlinDebug\n*F\n+ 1 LazyJavaStaticClassScope.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaStaticClassScope\n*L\n112#1:173\n112#1:174,3\n112#1:184,3\n168#1:193\n168#1:194,3\n112#1:177,7\n114#1:187\n114#1:188,5\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaStaticClassScope extends LazyJavaStaticScope {
|
||||
private final JavaClass jClass;
|
||||
private final JavaClassDescriptor ownerDescriptor;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaStaticClassScope(LazyJavaResolverContext c4, JavaClass jClass, JavaClassDescriptor ownerDescriptor) {
|
||||
super(c4);
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(jClass, "jClass");
|
||||
Intrinsics.checkNotNullParameter(ownerDescriptor, "ownerDescriptor");
|
||||
this.jClass = jClass;
|
||||
this.ownerDescriptor = ownerDescriptor;
|
||||
}
|
||||
|
||||
private final <R> Set<R> flatMapJavaStaticSupertypesScopes(final ClassDescriptor classDescriptor, final Set<R> set, final Function1<? super MemberScope, ? extends Collection<? extends R>> function1) {
|
||||
DFS.dfs(CollectionsKt.listOf(classDescriptor), new DFS.Neighbors() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$$Lambda$0
|
||||
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.Neighbors
|
||||
public Iterable getNeighbors(Object obj) {
|
||||
Iterable flatMapJavaStaticSupertypesScopes$lambda$6;
|
||||
flatMapJavaStaticSupertypesScopes$lambda$6 = LazyJavaStaticClassScope.flatMapJavaStaticSupertypesScopes$lambda$6((ClassDescriptor) obj);
|
||||
return flatMapJavaStaticSupertypesScopes$lambda$6;
|
||||
}
|
||||
}, new DFS.AbstractNodeHandler<ClassDescriptor, Unit>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$flatMapJavaStaticSupertypesScopes$2
|
||||
/* renamed from: result, reason: collision with other method in class */
|
||||
public void m1391result() {
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.AbstractNodeHandler, kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
|
||||
public boolean beforeChildren(ClassDescriptor current) {
|
||||
Intrinsics.checkNotNullParameter(current, "current");
|
||||
if (current == ClassDescriptor.this) {
|
||||
return true;
|
||||
}
|
||||
MemberScope staticScope = current.getStaticScope();
|
||||
Intrinsics.checkNotNullExpressionValue(staticScope, "getStaticScope(...)");
|
||||
if (!(staticScope instanceof LazyJavaStaticScope)) {
|
||||
return true;
|
||||
}
|
||||
set.addAll((Collection) function1.invoke(staticScope));
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
|
||||
public /* bridge */ /* synthetic */ Object result() {
|
||||
m1391result();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
});
|
||||
return set;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Iterable flatMapJavaStaticSupertypesScopes$lambda$6(ClassDescriptor classDescriptor) {
|
||||
Collection<KotlinType> mo1395getSupertypes = classDescriptor.getTypeConstructor().mo1395getSupertypes();
|
||||
Intrinsics.checkNotNullExpressionValue(mo1395getSupertypes, "getSupertypes(...)");
|
||||
return SequencesKt.asIterable(SequencesKt.mapNotNull(CollectionsKt.asSequence(mo1395getSupertypes), new Function1<KotlinType, ClassDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$flatMapJavaStaticSupertypesScopes$1$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final ClassDescriptor invoke(KotlinType kotlinType) {
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
|
||||
if (mo1394getDeclarationDescriptor instanceof ClassDescriptor) {
|
||||
return (ClassDescriptor) mo1394getDeclarationDescriptor;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private final PropertyDescriptor getRealOriginal(PropertyDescriptor propertyDescriptor) {
|
||||
int collectionSizeOrDefault;
|
||||
if (propertyDescriptor.getKind().isReal()) {
|
||||
return propertyDescriptor;
|
||||
}
|
||||
Collection<? extends PropertyDescriptor> overriddenDescriptors = propertyDescriptor.getOverriddenDescriptors();
|
||||
Intrinsics.checkNotNullExpressionValue(overriddenDescriptors, "getOverriddenDescriptors(...)");
|
||||
Collection<? extends PropertyDescriptor> collection = overriddenDescriptors;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(collection, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (PropertyDescriptor propertyDescriptor2 : collection) {
|
||||
Intrinsics.checkNotNull(propertyDescriptor2);
|
||||
arrayList.add(getRealOriginal(propertyDescriptor2));
|
||||
}
|
||||
return (PropertyDescriptor) CollectionsKt.single(CollectionsKt.distinct(arrayList));
|
||||
}
|
||||
|
||||
private final Set<SimpleFunctionDescriptor> getStaticFunctionsFromJavaSuperClasses(Name name, ClassDescriptor classDescriptor) {
|
||||
LazyJavaStaticClassScope parentJavaStaticClassScope = UtilKt.getParentJavaStaticClassScope(classDescriptor);
|
||||
return parentJavaStaticClassScope == null ? SetsKt.emptySet() : CollectionsKt.toSet(parentJavaStaticClassScope.getContributedFunctions(name, NoLookupLocation.WHEN_GET_SUPER_MEMBERS));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computeClassNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computeFunctionNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Set<Name> mutableSet;
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
mutableSet = CollectionsKt___CollectionsKt.toMutableSet(getDeclaredMemberIndex().invoke().getMethodNames());
|
||||
LazyJavaStaticClassScope parentJavaStaticClassScope = UtilKt.getParentJavaStaticClassScope(getOwnerDescriptor());
|
||||
Set<Name> functionNames = parentJavaStaticClassScope != null ? parentJavaStaticClassScope.getFunctionNames() : null;
|
||||
if (functionNames == null) {
|
||||
functionNames = SetsKt.emptySet();
|
||||
}
|
||||
mutableSet.addAll(functionNames);
|
||||
if (this.jClass.isEnum()) {
|
||||
mutableSet.addAll(CollectionsKt.listOf((Object[]) new Name[]{StandardNames.ENUM_VALUE_OF, StandardNames.ENUM_VALUES}));
|
||||
}
|
||||
mutableSet.addAll(getC().getComponents().getSyntheticPartsProvider().getStaticFunctionNames(getC(), getOwnerDescriptor()));
|
||||
return mutableSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public void computeImplicitlyDeclaredFunctions(Collection<SimpleFunctionDescriptor> result, Name name) {
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
getC().getComponents().getSyntheticPartsProvider().generateStaticFunctions(getC(), getOwnerDescriptor(), name, result);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public void computeNonDeclaredFunctions(Collection<SimpleFunctionDescriptor> result, Name name) {
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Collection<? extends SimpleFunctionDescriptor> resolveOverridesForStaticMembers = DescriptorResolverUtils.resolveOverridesForStaticMembers(name, getStaticFunctionsFromJavaSuperClasses(name, getOwnerDescriptor()), result, getOwnerDescriptor(), getC().getComponents().getErrorReporter(), getC().getComponents().getKotlinTypeChecker().getOverridingUtil());
|
||||
Intrinsics.checkNotNullExpressionValue(resolveOverridesForStaticMembers, "resolveOverridesForStaticMembers(...)");
|
||||
result.addAll(resolveOverridesForStaticMembers);
|
||||
if (this.jClass.isEnum()) {
|
||||
if (Intrinsics.areEqual(name, StandardNames.ENUM_VALUE_OF)) {
|
||||
SimpleFunctionDescriptor createEnumValueOfMethod = DescriptorFactory.createEnumValueOfMethod(getOwnerDescriptor());
|
||||
Intrinsics.checkNotNullExpressionValue(createEnumValueOfMethod, "createEnumValueOfMethod(...)");
|
||||
result.add(createEnumValueOfMethod);
|
||||
} else if (Intrinsics.areEqual(name, StandardNames.ENUM_VALUES)) {
|
||||
SimpleFunctionDescriptor createEnumValuesMethod = DescriptorFactory.createEnumValuesMethod(getOwnerDescriptor());
|
||||
Intrinsics.checkNotNullExpressionValue(createEnumValuesMethod, "createEnumValuesMethod(...)");
|
||||
result.add(createEnumValuesMethod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticScope, kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public void computeNonDeclaredProperties(final Name name, Collection<PropertyDescriptor> result) {
|
||||
Name name2;
|
||||
Collection<PropertyDescriptor> collection;
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
Set flatMapJavaStaticSupertypesScopes = flatMapJavaStaticSupertypesScopes(getOwnerDescriptor(), new LinkedHashSet(), new Function1<MemberScope, Collection<? extends PropertyDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$computeNonDeclaredProperties$propertiesFromSupertypes$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<? extends PropertyDescriptor> invoke(MemberScope it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return it.getContributedVariables(Name.this, NoLookupLocation.WHEN_GET_SUPER_MEMBERS);
|
||||
}
|
||||
});
|
||||
if (result.isEmpty()) {
|
||||
name2 = name;
|
||||
collection = result;
|
||||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||||
for (Object obj : flatMapJavaStaticSupertypesScopes) {
|
||||
PropertyDescriptor realOriginal = getRealOriginal((PropertyDescriptor) obj);
|
||||
Object obj2 = linkedHashMap.get(realOriginal);
|
||||
if (obj2 == null) {
|
||||
obj2 = new ArrayList();
|
||||
linkedHashMap.put(realOriginal, obj2);
|
||||
}
|
||||
((List) obj2).add(obj);
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator it = linkedHashMap.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Collection resolveOverridesForStaticMembers = DescriptorResolverUtils.resolveOverridesForStaticMembers(name2, (Collection) ((Map.Entry) it.next()).getValue(), collection, getOwnerDescriptor(), getC().getComponents().getErrorReporter(), getC().getComponents().getKotlinTypeChecker().getOverridingUtil());
|
||||
Intrinsics.checkNotNullExpressionValue(resolveOverridesForStaticMembers, "resolveOverridesForStaticMembers(...)");
|
||||
CollectionsKt__MutableCollectionsKt.addAll(arrayList, resolveOverridesForStaticMembers);
|
||||
}
|
||||
collection.addAll(arrayList);
|
||||
} else {
|
||||
Collection<? extends PropertyDescriptor> resolveOverridesForStaticMembers2 = DescriptorResolverUtils.resolveOverridesForStaticMembers(name, flatMapJavaStaticSupertypesScopes, result, getOwnerDescriptor(), getC().getComponents().getErrorReporter(), getC().getComponents().getKotlinTypeChecker().getOverridingUtil());
|
||||
name2 = name;
|
||||
collection = result;
|
||||
Intrinsics.checkNotNullExpressionValue(resolveOverridesForStaticMembers2, "resolveOverridesForStaticMembers(...)");
|
||||
collection.addAll(resolveOverridesForStaticMembers2);
|
||||
}
|
||||
if (this.jClass.isEnum() && Intrinsics.areEqual(name2, StandardNames.ENUM_ENTRIES)) {
|
||||
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(collection, DescriptorFactory.createEnumEntriesProperty(getOwnerDescriptor()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public Set<Name> computePropertyNames(DescriptorKindFilter kindFilter, Function1<? super Name, Boolean> function1) {
|
||||
Set<Name> mutableSet;
|
||||
Intrinsics.checkNotNullParameter(kindFilter, "kindFilter");
|
||||
mutableSet = CollectionsKt___CollectionsKt.toMutableSet(getDeclaredMemberIndex().invoke().getFieldNames());
|
||||
flatMapJavaStaticSupertypesScopes(getOwnerDescriptor(), mutableSet, new Function1<MemberScope, Collection<? extends Name>>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$computePropertyNames$1$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Collection<Name> invoke(MemberScope it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return it.getVariableNames();
|
||||
}
|
||||
});
|
||||
if (this.jClass.isEnum()) {
|
||||
mutableSet.add(StandardNames.ENUM_ENTRIES);
|
||||
}
|
||||
return mutableSet;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScopeImpl, kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope
|
||||
/* renamed from: getContributedClassifier */
|
||||
public ClassifierDescriptor mo1396getContributedClassifier(Name name, LookupLocation location) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(location, "location");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public ClassDeclaredMemberIndex computeMemberIndex() {
|
||||
return new ClassDeclaredMemberIndex(this.jClass, new Function1<JavaMember, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaStaticClassScope$computeMemberIndex$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(JavaMember it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(it.isStatic());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public JavaClassDescriptor getOwnerDescriptor() {
|
||||
return this.ownerDescriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ReceiverParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaMethod;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class LazyJavaStaticScope extends LazyJavaScope {
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaStaticScope(LazyJavaResolverContext c4) {
|
||||
super(c4, null, 2, null);
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public void computeNonDeclaredProperties(Name name, Collection<PropertyDescriptor> result) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(result, "result");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public ReceiverParameterDescriptor getDispatchReceiverParameter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaScope
|
||||
public LazyJavaScope.MethodSignatureData resolveMethodSignature(JavaMethod method, List<? extends TypeParameterDescriptor> methodTypeParameters, KotlinType returnType, List<? extends ValueParameterDescriptor> valueParameters) {
|
||||
Intrinsics.checkNotNullParameter(method, "method");
|
||||
Intrinsics.checkNotNullParameter(methodTypeParameters, "methodTypeParameters");
|
||||
Intrinsics.checkNotNullParameter(returnType, "returnType");
|
||||
Intrinsics.checkNotNullParameter(valueParameters, "valueParameters");
|
||||
return new LazyJavaScope.MethodSignatureData(returnType, null, valueParameters, methodTypeParameters, false, CollectionsKt.emptyList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractLazyTypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifierType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nLazyJavaTypeParameterDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LazyJavaTypeParameterDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,75:1\n1549#2:76\n1620#2,3:77\n*S KotlinDebug\n*F\n+ 1 LazyJavaTypeParameterDescriptor.kt\norg/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaTypeParameterDescriptor\n*L\n62#1:76\n62#1:77,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LazyJavaTypeParameterDescriptor extends AbstractLazyTypeParameterDescriptor {
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7133c;
|
||||
private final JavaTypeParameter javaTypeParameter;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public LazyJavaTypeParameterDescriptor(LazyJavaResolverContext c4, JavaTypeParameter javaTypeParameter, int i, DeclarationDescriptor containingDeclaration) {
|
||||
super(c4.getStorageManager(), containingDeclaration, new LazyJavaAnnotations(c4, javaTypeParameter, false, 4, null), javaTypeParameter.getName(), Variance.INVARIANT, false, i, SourceElement.NO_SOURCE, c4.getComponents().getSupertypeLoopChecker());
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(javaTypeParameter, "javaTypeParameter");
|
||||
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
|
||||
this.f7133c = c4;
|
||||
this.javaTypeParameter = javaTypeParameter;
|
||||
}
|
||||
|
||||
private final List<KotlinType> computeNotEnhancedBounds() {
|
||||
int collectionSizeOrDefault;
|
||||
Collection<JavaClassifierType> upperBounds = this.javaTypeParameter.getUpperBounds();
|
||||
if (upperBounds.isEmpty()) {
|
||||
SimpleType anyType = this.f7133c.getModule().getBuiltIns().getAnyType();
|
||||
Intrinsics.checkNotNullExpressionValue(anyType, "getAnyType(...)");
|
||||
SimpleType nullableAnyType = this.f7133c.getModule().getBuiltIns().getNullableAnyType();
|
||||
Intrinsics.checkNotNullExpressionValue(nullableAnyType, "getNullableAnyType(...)");
|
||||
return CollectionsKt.listOf(KotlinTypeFactory.flexibleType(anyType, nullableAnyType));
|
||||
}
|
||||
Collection<JavaClassifierType> collection = upperBounds;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(collection, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = collection.iterator();
|
||||
while (it.hasNext()) {
|
||||
LazyJavaTypeParameterDescriptor lazyJavaTypeParameterDescriptor = this;
|
||||
arrayList.add(this.f7133c.getTypeResolver().transformJavaType((JavaClassifierType) it.next(), JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, lazyJavaTypeParameterDescriptor, 3, null)));
|
||||
this = lazyJavaTypeParameterDescriptor;
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractTypeParameterDescriptor
|
||||
public List<KotlinType> processBoundsWithoutCycles(List<? extends KotlinType> bounds) {
|
||||
Intrinsics.checkNotNullParameter(bounds, "bounds");
|
||||
return this.f7133c.getComponents().getSignatureEnhancement().enhanceTypeParameterBounds(this, bounds, this.f7133c);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractTypeParameterDescriptor
|
||||
/* renamed from: reportSupertypeLoopError */
|
||||
public void mo1397reportSupertypeLoopError(KotlinType type) {
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractTypeParameterDescriptor
|
||||
public List<KotlinType> resolveUpperBounds() {
|
||||
return computeNotEnhancedBounds();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import java.util.Set;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeAttributes extends ErasureTypeAttributes {
|
||||
private final SimpleType defaultType;
|
||||
private final JavaTypeFlexibility flexibility;
|
||||
private final TypeUsage howThisTypeIsUsed;
|
||||
private final boolean isForAnnotationParameter;
|
||||
private final boolean isRaw;
|
||||
private final Set<TypeParameterDescriptor> visitedTypeParameters;
|
||||
|
||||
public /* synthetic */ JavaTypeAttributes(TypeUsage typeUsage, JavaTypeFlexibility javaTypeFlexibility, boolean z3, boolean z4, Set set, SimpleType simpleType, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(typeUsage, (i & 2) != 0 ? JavaTypeFlexibility.INFLEXIBLE : javaTypeFlexibility, (i & 4) != 0 ? false : z3, (i & 8) != 0 ? false : z4, (i & 16) != 0 ? null : set, (i & 32) != 0 ? null : simpleType);
|
||||
}
|
||||
|
||||
public static /* synthetic */ JavaTypeAttributes copy$default(JavaTypeAttributes javaTypeAttributes, TypeUsage typeUsage, JavaTypeFlexibility javaTypeFlexibility, boolean z3, boolean z4, Set set, SimpleType simpleType, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
typeUsage = javaTypeAttributes.howThisTypeIsUsed;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
javaTypeFlexibility = javaTypeAttributes.flexibility;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
z3 = javaTypeAttributes.isRaw;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
z4 = javaTypeAttributes.isForAnnotationParameter;
|
||||
}
|
||||
if ((i & 16) != 0) {
|
||||
set = javaTypeAttributes.visitedTypeParameters;
|
||||
}
|
||||
if ((i & 32) != 0) {
|
||||
simpleType = javaTypeAttributes.defaultType;
|
||||
}
|
||||
Set set2 = set;
|
||||
SimpleType simpleType2 = simpleType;
|
||||
return javaTypeAttributes.copy(typeUsage, javaTypeFlexibility, z3, z4, set2, simpleType2);
|
||||
}
|
||||
|
||||
public final JavaTypeAttributes copy(TypeUsage howThisTypeIsUsed, JavaTypeFlexibility flexibility, boolean z3, boolean z4, Set<? extends TypeParameterDescriptor> set, SimpleType simpleType) {
|
||||
Intrinsics.checkNotNullParameter(howThisTypeIsUsed, "howThisTypeIsUsed");
|
||||
Intrinsics.checkNotNullParameter(flexibility, "flexibility");
|
||||
return new JavaTypeAttributes(howThisTypeIsUsed, flexibility, z3, z4, set, simpleType);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof JavaTypeAttributes)) {
|
||||
return false;
|
||||
}
|
||||
JavaTypeAttributes javaTypeAttributes = (JavaTypeAttributes) obj;
|
||||
return Intrinsics.areEqual(javaTypeAttributes.getDefaultType(), getDefaultType()) && javaTypeAttributes.getHowThisTypeIsUsed() == getHowThisTypeIsUsed() && javaTypeAttributes.flexibility == this.flexibility && javaTypeAttributes.isRaw == this.isRaw && javaTypeAttributes.isForAnnotationParameter == this.isForAnnotationParameter;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public SimpleType getDefaultType() {
|
||||
return this.defaultType;
|
||||
}
|
||||
|
||||
public final JavaTypeFlexibility getFlexibility() {
|
||||
return this.flexibility;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public TypeUsage getHowThisTypeIsUsed() {
|
||||
return this.howThisTypeIsUsed;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public Set<TypeParameterDescriptor> getVisitedTypeParameters() {
|
||||
return this.visitedTypeParameters;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public int hashCode() {
|
||||
SimpleType defaultType = getDefaultType();
|
||||
int hashCode = defaultType != null ? defaultType.hashCode() : 0;
|
||||
int hashCode2 = getHowThisTypeIsUsed().hashCode() + (hashCode * 31) + hashCode;
|
||||
int hashCode3 = this.flexibility.hashCode() + (hashCode2 * 31) + hashCode2;
|
||||
int i = (hashCode3 * 31) + (this.isRaw ? 1 : 0) + hashCode3;
|
||||
return (i * 31) + (this.isForAnnotationParameter ? 1 : 0) + i;
|
||||
}
|
||||
|
||||
public final boolean isForAnnotationParameter() {
|
||||
return this.isForAnnotationParameter;
|
||||
}
|
||||
|
||||
public final boolean isRaw() {
|
||||
return this.isRaw;
|
||||
}
|
||||
|
||||
public final JavaTypeAttributes markIsRaw(boolean z3) {
|
||||
return copy$default(this, null, null, z3, false, null, null, 59, null);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "JavaTypeAttributes(howThisTypeIsUsed=" + this.howThisTypeIsUsed + ", flexibility=" + this.flexibility + ", isRaw=" + this.isRaw + ", isForAnnotationParameter=" + this.isForAnnotationParameter + ", visitedTypeParameters=" + this.visitedTypeParameters + ", defaultType=" + this.defaultType + ')';
|
||||
}
|
||||
|
||||
public JavaTypeAttributes withDefaultType(SimpleType simpleType) {
|
||||
return copy$default(this, null, null, false, false, null, simpleType, 31, null);
|
||||
}
|
||||
|
||||
public final JavaTypeAttributes withFlexibility(JavaTypeFlexibility flexibility) {
|
||||
Intrinsics.checkNotNullParameter(flexibility, "flexibility");
|
||||
return copy$default(this, null, flexibility, false, false, null, null, 61, null);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes
|
||||
public JavaTypeAttributes withNewVisitedTypeParameter(TypeParameterDescriptor typeParameter) {
|
||||
Intrinsics.checkNotNullParameter(typeParameter, "typeParameter");
|
||||
return copy$default(this, null, null, false, false, getVisitedTypeParameters() != null ? SetsKt.plus(getVisitedTypeParameters(), typeParameter) : SetsKt.setOf(typeParameter), null, 47, null);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public JavaTypeAttributes(TypeUsage howThisTypeIsUsed, JavaTypeFlexibility flexibility, boolean z3, boolean z4, Set<? extends TypeParameterDescriptor> set, SimpleType simpleType) {
|
||||
super(howThisTypeIsUsed, set, simpleType);
|
||||
Intrinsics.checkNotNullParameter(howThisTypeIsUsed, "howThisTypeIsUsed");
|
||||
Intrinsics.checkNotNullParameter(flexibility, "flexibility");
|
||||
this.howThisTypeIsUsed = howThisTypeIsUsed;
|
||||
this.flexibility = flexibility;
|
||||
this.isRaw = z3;
|
||||
this.isForAnnotationParameter = z4;
|
||||
this.visitedTypeParameters = set;
|
||||
this.defaultType = simpleType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJavaTypeAttributes.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaTypeAttributes.kt\norg/jetbrains/kotlin/load/java/lazy/types/JavaTypeAttributesKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,57:1\n1#2:58\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeAttributesKt {
|
||||
public static final JavaTypeAttributes toAttributes(TypeUsage typeUsage, boolean z3, boolean z4, TypeParameterDescriptor typeParameterDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(typeUsage, "<this>");
|
||||
return new JavaTypeAttributes(typeUsage, null, z4, z3, typeParameterDescriptor != null ? SetsKt.setOf(typeParameterDescriptor) : null, null, 34, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ JavaTypeAttributes toAttributes$default(TypeUsage typeUsage, boolean z3, boolean z4, TypeParameterDescriptor typeParameterDescriptor, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
z3 = false;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
z4 = false;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
typeParameterDescriptor = null;
|
||||
}
|
||||
return toAttributes(typeUsage, z3, z4, typeParameterDescriptor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeFlexibility {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ JavaTypeFlexibility[] $VALUES;
|
||||
public static final JavaTypeFlexibility INFLEXIBLE = new JavaTypeFlexibility("INFLEXIBLE", 0);
|
||||
public static final JavaTypeFlexibility FLEXIBLE_UPPER_BOUND = new JavaTypeFlexibility("FLEXIBLE_UPPER_BOUND", 1);
|
||||
public static final JavaTypeFlexibility FLEXIBLE_LOWER_BOUND = new JavaTypeFlexibility("FLEXIBLE_LOWER_BOUND", 2);
|
||||
|
||||
private static final /* synthetic */ JavaTypeFlexibility[] $values() {
|
||||
return new JavaTypeFlexibility[]{INFLEXIBLE, FLEXIBLE_UPPER_BOUND, FLEXIBLE_LOWER_BOUND};
|
||||
}
|
||||
|
||||
static {
|
||||
JavaTypeFlexibility[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private JavaTypeFlexibility(String str, int i) {
|
||||
}
|
||||
|
||||
public static JavaTypeFlexibility valueOf(String str) {
|
||||
return (JavaTypeFlexibility) Enum.valueOf(JavaTypeFlexibility.class, str);
|
||||
}
|
||||
|
||||
public static JavaTypeFlexibility[] values() {
|
||||
return (JavaTypeFlexibility[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,417 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.jvm.JavaToKotlinClassMapper;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.CompositeAnnotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.UtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaAnnotations;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.LazyJavaResolverContext;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.lazy.TypeParameterResolver;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaArrayType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClass;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifier;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifierType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaPrimitiveType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypeParameter;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaTypesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaWildcardType;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.types.LazyWrappedType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeAttributesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeParameterUpperBoundEraser;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nJavaTypeResolver.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaTypeResolver.kt\norg/jetbrains/kotlin/load/java/lazy/types/JavaTypeResolver\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 coreLib.kt\norg/jetbrains/kotlin/utils/CoreLibKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,321:1\n1#2:322\n19#3:323\n1549#4:324\n1620#4,3:325\n1549#4:328\n1620#4,3:329\n1549#4:332\n1620#4,3:333\n*S KotlinDebug\n*F\n+ 1 JavaTypeResolver.kt\norg/jetbrains/kotlin/load/java/lazy/types/JavaTypeResolver\n*L\n144#1:323\n205#1:324\n205#1:325,3\n263#1:328\n263#1:329,3\n267#1:332\n267#1:333,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeResolver {
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
private final LazyJavaResolverContext f7134c;
|
||||
private final RawProjectionComputer projectionComputer;
|
||||
private final TypeParameterResolver typeParameterResolver;
|
||||
private final TypeParameterUpperBoundEraser typeParameterUpperBoundEraser;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public JavaTypeResolver(LazyJavaResolverContext c4, TypeParameterResolver typeParameterResolver) {
|
||||
Intrinsics.checkNotNullParameter(c4, "c");
|
||||
Intrinsics.checkNotNullParameter(typeParameterResolver, "typeParameterResolver");
|
||||
this.f7134c = c4;
|
||||
this.typeParameterResolver = typeParameterResolver;
|
||||
RawProjectionComputer rawProjectionComputer = new RawProjectionComputer();
|
||||
this.projectionComputer = rawProjectionComputer;
|
||||
this.typeParameterUpperBoundEraser = new TypeParameterUpperBoundEraser(rawProjectionComputer, null, 2, 0 == true ? 1 : 0);
|
||||
}
|
||||
|
||||
private final boolean argumentsMakeSenseOnlyForMutableContainer(JavaClassifierType javaClassifierType, ClassDescriptor classDescriptor) {
|
||||
Variance variance;
|
||||
if (!JavaTypesKt.isSuperWildcard((JavaType) CollectionsKt.lastOrNull((List) javaClassifierType.getTypeArguments()))) {
|
||||
return false;
|
||||
}
|
||||
List<TypeParameterDescriptor> parameters = JavaToKotlinClassMapper.INSTANCE.convertReadOnlyToMutable(classDescriptor).getTypeConstructor().getParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(parameters, "getParameters(...)");
|
||||
TypeParameterDescriptor typeParameterDescriptor = (TypeParameterDescriptor) CollectionsKt.lastOrNull((List) parameters);
|
||||
return (typeParameterDescriptor == null || (variance = typeParameterDescriptor.getVariance()) == null || variance == Variance.OUT_VARIANCE) ? false : true;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:6:0x001f, code lost:
|
||||
|
||||
if (r0.isEmpty() == false) goto L10;
|
||||
*/
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x002e */
|
||||
/* JADX WARN: Removed duplicated region for block: B:13:0x0033 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private final java.util.List<kotlin.reflect.jvm.internal.impl.types.TypeProjection> computeArguments(kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifierType r10, kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributes r11, kotlin.reflect.jvm.internal.impl.types.TypeConstructor r12) {
|
||||
/*
|
||||
r9 = this;
|
||||
boolean r0 = r10.isRaw()
|
||||
java.lang.String r1 = "getParameters(...)"
|
||||
if (r0 != 0) goto L24
|
||||
java.util.List r0 = r10.getTypeArguments()
|
||||
boolean r0 = r0.isEmpty()
|
||||
if (r0 == 0) goto L22
|
||||
java.util.List r0 = r12.getParameters()
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)
|
||||
java.util.Collection r0 = (java.util.Collection) r0
|
||||
boolean r0 = r0.isEmpty()
|
||||
if (r0 != 0) goto L22
|
||||
goto L24
|
||||
L22:
|
||||
r0 = 0
|
||||
goto L25
|
||||
L24:
|
||||
r0 = 1
|
||||
L25:
|
||||
java.util.List r2 = r12.getParameters()
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r1)
|
||||
if (r0 == 0) goto L33
|
||||
java.util.List r9 = r9.computeRawTypeArguments(r10, r2, r12, r11)
|
||||
return r9
|
||||
L33:
|
||||
int r11 = r2.size()
|
||||
java.util.List r12 = r10.getTypeArguments()
|
||||
int r12 = r12.size()
|
||||
if (r11 == r12) goto L81
|
||||
java.lang.Iterable r2 = (java.lang.Iterable) r2
|
||||
java.util.ArrayList r9 = new java.util.ArrayList
|
||||
int r10 = kotlin.collections.CollectionsKt.g(r2)
|
||||
r9.<init>(r10)
|
||||
java.util.Iterator r10 = r2.iterator()
|
||||
L50:
|
||||
boolean r11 = r10.hasNext()
|
||||
if (r11 == 0) goto L7c
|
||||
java.lang.Object r11 = r10.next()
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor r11 = (kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor) r11
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl r12 = new kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl
|
||||
kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind r0 = kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind.MISSED_TYPE_ARGUMENT_FOR_TYPE_PARAMETER
|
||||
kotlin.reflect.jvm.internal.impl.name.Name r11 = r11.getName()
|
||||
java.lang.String r11 = r11.asString()
|
||||
java.lang.String r1 = "asString(...)"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r11, r1)
|
||||
java.lang.String[] r11 = new java.lang.String[]{r11}
|
||||
kotlin.reflect.jvm.internal.impl.types.error.ErrorType r11 = kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils.createErrorType(r0, r11)
|
||||
r12.<init>(r11)
|
||||
r9.add(r12)
|
||||
goto L50
|
||||
L7c:
|
||||
java.util.List r9 = kotlin.collections.CollectionsKt.toList(r9)
|
||||
return r9
|
||||
L81:
|
||||
java.util.List r10 = r10.getTypeArguments()
|
||||
java.lang.Iterable r10 = (java.lang.Iterable) r10
|
||||
java.lang.Iterable r10 = kotlin.collections.CollectionsKt.withIndex(r10)
|
||||
java.util.ArrayList r11 = new java.util.ArrayList
|
||||
int r12 = kotlin.collections.CollectionsKt.g(r10)
|
||||
r11.<init>(r12)
|
||||
java.util.Iterator r10 = r10.iterator()
|
||||
L98:
|
||||
boolean r12 = r10.hasNext()
|
||||
if (r12 == 0) goto Lcd
|
||||
java.lang.Object r12 = r10.next()
|
||||
kotlin.collections.IndexedValue r12 = (kotlin.collections.IndexedValue) r12
|
||||
int r0 = r12.getIndex()
|
||||
java.lang.Object r12 = r12.component2()
|
||||
kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType r12 = (kotlin.reflect.jvm.internal.impl.load.java.structure.JavaType) r12
|
||||
r2.size()
|
||||
java.lang.Object r0 = r2.get(r0)
|
||||
kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor r0 = (kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor) r0
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeUsage r3 = kotlin.reflect.jvm.internal.impl.types.TypeUsage.COMMON
|
||||
r5 = 0
|
||||
r6 = 0
|
||||
r4 = 0
|
||||
r7 = 7
|
||||
r8 = 0
|
||||
kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributes r1 = kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributesKt.toAttributes$default(r3, r4, r5, r6, r7, r8)
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNull(r0)
|
||||
kotlin.reflect.jvm.internal.impl.types.TypeProjection r12 = r9.transformToTypeProjection(r12, r1, r0)
|
||||
r11.add(r12)
|
||||
goto L98
|
||||
Lcd:
|
||||
java.util.List r9 = kotlin.collections.CollectionsKt.toList(r11)
|
||||
return r9
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeResolver.computeArguments(kotlin.reflect.jvm.internal.impl.load.java.structure.JavaClassifierType, kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeAttributes, kotlin.reflect.jvm.internal.impl.types.TypeConstructor):java.util.List");
|
||||
}
|
||||
|
||||
private final List<TypeProjection> computeRawTypeArguments(JavaClassifierType javaClassifierType, List<? extends TypeParameterDescriptor> list, TypeConstructor typeConstructor, JavaTypeAttributes javaTypeAttributes) {
|
||||
int collectionSizeOrDefault;
|
||||
final JavaTypeResolver javaTypeResolver;
|
||||
final JavaClassifierType javaClassifierType2;
|
||||
final TypeConstructor typeConstructor2;
|
||||
final JavaTypeAttributes javaTypeAttributes2;
|
||||
TypeProjection computeProjection;
|
||||
List<? extends TypeParameterDescriptor> list2 = list;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (final TypeParameterDescriptor typeParameterDescriptor : list2) {
|
||||
if (TypeUtilsKt.hasTypeParameterRecursiveBounds(typeParameterDescriptor, null, javaTypeAttributes.getVisitedTypeParameters())) {
|
||||
computeProjection = TypeUtils.makeStarProjection(typeParameterDescriptor, javaTypeAttributes);
|
||||
javaTypeResolver = this;
|
||||
javaClassifierType2 = javaClassifierType;
|
||||
typeConstructor2 = typeConstructor;
|
||||
javaTypeAttributes2 = javaTypeAttributes;
|
||||
} else {
|
||||
javaTypeResolver = this;
|
||||
javaClassifierType2 = javaClassifierType;
|
||||
typeConstructor2 = typeConstructor;
|
||||
javaTypeAttributes2 = javaTypeAttributes;
|
||||
computeProjection = javaTypeResolver.projectionComputer.computeProjection(typeParameterDescriptor, javaTypeAttributes2.markIsRaw(javaClassifierType2.isRaw()), javaTypeResolver.typeParameterUpperBoundEraser, new LazyWrappedType(this.f7134c.getStorageManager(), new Function0<KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.types.JavaTypeResolver$computeRawTypeArguments$1$erasedUpperBound$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final KotlinType invoke() {
|
||||
TypeParameterUpperBoundEraser typeParameterUpperBoundEraser;
|
||||
typeParameterUpperBoundEraser = JavaTypeResolver.this.typeParameterUpperBoundEraser;
|
||||
TypeParameterDescriptor typeParameterDescriptor2 = typeParameterDescriptor;
|
||||
JavaTypeAttributes javaTypeAttributes3 = javaTypeAttributes2;
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = typeConstructor2.mo1394getDeclarationDescriptor();
|
||||
return typeParameterUpperBoundEraser.getErasedUpperBound(typeParameterDescriptor2, javaTypeAttributes3.withDefaultType(mo1394getDeclarationDescriptor != null ? mo1394getDeclarationDescriptor.getDefaultType() : null).markIsRaw(javaClassifierType2.isRaw()));
|
||||
}
|
||||
}));
|
||||
}
|
||||
arrayList.add(computeProjection);
|
||||
this = javaTypeResolver;
|
||||
javaTypeAttributes = javaTypeAttributes2;
|
||||
typeConstructor = typeConstructor2;
|
||||
javaClassifierType = javaClassifierType2;
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private final SimpleType computeSimpleJavaClassifierType(JavaClassifierType javaClassifierType, JavaTypeAttributes javaTypeAttributes, SimpleType simpleType) {
|
||||
JavaClassifierType javaClassifierType2;
|
||||
TypeAttributes defaultAttributes;
|
||||
if (simpleType == null || (defaultAttributes = simpleType.getAttributes()) == null) {
|
||||
javaClassifierType2 = javaClassifierType;
|
||||
defaultAttributes = TypeAttributesKt.toDefaultAttributes(new LazyJavaAnnotations(this.f7134c, javaClassifierType2, false, 4, null));
|
||||
} else {
|
||||
javaClassifierType2 = javaClassifierType;
|
||||
}
|
||||
TypeAttributes typeAttributes = defaultAttributes;
|
||||
TypeConstructor computeTypeConstructor = computeTypeConstructor(javaClassifierType2, javaTypeAttributes);
|
||||
if (computeTypeConstructor == null) {
|
||||
return null;
|
||||
}
|
||||
boolean isNullable = isNullable(javaTypeAttributes);
|
||||
return (Intrinsics.areEqual(simpleType != null ? simpleType.getConstructor() : null, computeTypeConstructor) && !javaClassifierType2.isRaw() && isNullable) ? simpleType.makeNullableAsSpecified(true) : KotlinTypeFactory.simpleType$default(typeAttributes, computeTypeConstructor, computeArguments(javaClassifierType2, javaTypeAttributes, computeTypeConstructor), isNullable, (KotlinTypeRefiner) null, 16, (Object) null);
|
||||
}
|
||||
|
||||
private final TypeConstructor computeTypeConstructor(JavaClassifierType javaClassifierType, JavaTypeAttributes javaTypeAttributes) {
|
||||
TypeConstructor typeConstructor;
|
||||
JavaClassifier classifier = javaClassifierType.getClassifier();
|
||||
if (classifier == null) {
|
||||
return createNotFoundClass(javaClassifierType);
|
||||
}
|
||||
if (!(classifier instanceof JavaClass)) {
|
||||
if (!(classifier instanceof JavaTypeParameter)) {
|
||||
throw new IllegalStateException("Unknown classifier kind: " + classifier);
|
||||
}
|
||||
TypeParameterDescriptor resolveTypeParameter = this.typeParameterResolver.resolveTypeParameter((JavaTypeParameter) classifier);
|
||||
if (resolveTypeParameter != null) {
|
||||
return resolveTypeParameter.getTypeConstructor();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
JavaClass javaClass = (JavaClass) classifier;
|
||||
FqName fqName = javaClass.getFqName();
|
||||
if (fqName == null) {
|
||||
throw new AssertionError("Class type should have a FQ name: " + classifier);
|
||||
}
|
||||
ClassDescriptor mapKotlinClass = mapKotlinClass(javaClassifierType, javaTypeAttributes, fqName);
|
||||
if (mapKotlinClass == null) {
|
||||
mapKotlinClass = this.f7134c.getComponents().getModuleClassResolver().resolveClass(javaClass);
|
||||
}
|
||||
return (mapKotlinClass == null || (typeConstructor = mapKotlinClass.getTypeConstructor()) == null) ? createNotFoundClass(javaClassifierType) : typeConstructor;
|
||||
}
|
||||
|
||||
private final TypeConstructor createNotFoundClass(JavaClassifierType javaClassifierType) {
|
||||
ClassId classId = ClassId.topLevel(new FqName(javaClassifierType.getClassifierQualifiedName()));
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
TypeConstructor typeConstructor = this.f7134c.getComponents().getDeserializedDescriptorResolver().getComponents().getNotFoundClasses().getClass(classId, CollectionsKt.listOf(0)).getTypeConstructor();
|
||||
Intrinsics.checkNotNullExpressionValue(typeConstructor, "getTypeConstructor(...)");
|
||||
return typeConstructor;
|
||||
}
|
||||
|
||||
private final boolean isConflictingArgumentFor(Variance variance, TypeParameterDescriptor typeParameterDescriptor) {
|
||||
return (typeParameterDescriptor.getVariance() == Variance.INVARIANT || variance == typeParameterDescriptor.getVariance()) ? false : true;
|
||||
}
|
||||
|
||||
private final boolean isNullable(JavaTypeAttributes javaTypeAttributes) {
|
||||
return (javaTypeAttributes.getFlexibility() == JavaTypeFlexibility.FLEXIBLE_LOWER_BOUND || javaTypeAttributes.isForAnnotationParameter() || javaTypeAttributes.getHowThisTypeIsUsed() == TypeUsage.SUPERTYPE) ? false : true;
|
||||
}
|
||||
|
||||
private final ClassDescriptor mapKotlinClass(JavaClassifierType javaClassifierType, JavaTypeAttributes javaTypeAttributes, FqName fqName) {
|
||||
FqName fqName2;
|
||||
if (javaTypeAttributes.isForAnnotationParameter()) {
|
||||
fqName2 = JavaTypeResolverKt.JAVA_LANG_CLASS_FQ_NAME;
|
||||
if (Intrinsics.areEqual(fqName, fqName2)) {
|
||||
return this.f7134c.getComponents().getReflectionTypes().getKClass();
|
||||
}
|
||||
}
|
||||
JavaToKotlinClassMapper javaToKotlinClassMapper = JavaToKotlinClassMapper.INSTANCE;
|
||||
ClassDescriptor mapJavaToKotlin$default = JavaToKotlinClassMapper.mapJavaToKotlin$default(javaToKotlinClassMapper, fqName, this.f7134c.getModule().getBuiltIns(), null, 4, null);
|
||||
if (mapJavaToKotlin$default == null) {
|
||||
return null;
|
||||
}
|
||||
return (javaToKotlinClassMapper.isReadOnly(mapJavaToKotlin$default) && (javaTypeAttributes.getFlexibility() == JavaTypeFlexibility.FLEXIBLE_LOWER_BOUND || javaTypeAttributes.getHowThisTypeIsUsed() == TypeUsage.SUPERTYPE || argumentsMakeSenseOnlyForMutableContainer(javaClassifierType, mapJavaToKotlin$default))) ? javaToKotlinClassMapper.convertReadOnlyToMutable(mapJavaToKotlin$default) : mapJavaToKotlin$default;
|
||||
}
|
||||
|
||||
public static /* synthetic */ KotlinType transformArrayType$default(JavaTypeResolver javaTypeResolver, JavaArrayType javaArrayType, JavaTypeAttributes javaTypeAttributes, boolean z3, int i, Object obj) {
|
||||
if ((i & 4) != 0) {
|
||||
z3 = false;
|
||||
}
|
||||
return javaTypeResolver.transformArrayType(javaArrayType, javaTypeAttributes, z3);
|
||||
}
|
||||
|
||||
private final KotlinType transformJavaClassifierType(JavaClassifierType javaClassifierType, JavaTypeAttributes javaTypeAttributes) {
|
||||
SimpleType computeSimpleJavaClassifierType;
|
||||
boolean z3 = (javaTypeAttributes.isForAnnotationParameter() || javaTypeAttributes.getHowThisTypeIsUsed() == TypeUsage.SUPERTYPE) ? false : true;
|
||||
boolean isRaw = javaClassifierType.isRaw();
|
||||
if (!isRaw && !z3) {
|
||||
SimpleType computeSimpleJavaClassifierType2 = computeSimpleJavaClassifierType(javaClassifierType, javaTypeAttributes, null);
|
||||
return computeSimpleJavaClassifierType2 != null ? computeSimpleJavaClassifierType2 : transformJavaClassifierType$errorType(javaClassifierType);
|
||||
}
|
||||
SimpleType computeSimpleJavaClassifierType3 = computeSimpleJavaClassifierType(javaClassifierType, javaTypeAttributes.withFlexibility(JavaTypeFlexibility.FLEXIBLE_LOWER_BOUND), null);
|
||||
if (computeSimpleJavaClassifierType3 != null && (computeSimpleJavaClassifierType = computeSimpleJavaClassifierType(javaClassifierType, javaTypeAttributes.withFlexibility(JavaTypeFlexibility.FLEXIBLE_UPPER_BOUND), computeSimpleJavaClassifierType3)) != null) {
|
||||
return isRaw ? new RawTypeImpl(computeSimpleJavaClassifierType3, computeSimpleJavaClassifierType) : KotlinTypeFactory.flexibleType(computeSimpleJavaClassifierType3, computeSimpleJavaClassifierType);
|
||||
}
|
||||
return transformJavaClassifierType$errorType(javaClassifierType);
|
||||
}
|
||||
|
||||
private static final ErrorType transformJavaClassifierType$errorType(JavaClassifierType javaClassifierType) {
|
||||
return ErrorUtils.createErrorType(ErrorTypeKind.UNRESOLVED_JAVA_CLASS, javaClassifierType.getPresentableText());
|
||||
}
|
||||
|
||||
private final TypeProjection transformToTypeProjection(JavaType javaType, JavaTypeAttributes javaTypeAttributes, TypeParameterDescriptor typeParameterDescriptor) {
|
||||
TypeProjection makeStarProjection;
|
||||
if (!(javaType instanceof JavaWildcardType)) {
|
||||
return new TypeProjectionImpl(Variance.INVARIANT, transformJavaType(javaType, javaTypeAttributes));
|
||||
}
|
||||
JavaWildcardType javaWildcardType = (JavaWildcardType) javaType;
|
||||
JavaType bound = javaWildcardType.getBound();
|
||||
Variance variance = javaWildcardType.isExtends() ? Variance.OUT_VARIANCE : Variance.IN_VARIANCE;
|
||||
if (bound == null || isConflictingArgumentFor(variance, typeParameterDescriptor)) {
|
||||
makeStarProjection = TypeUtils.makeStarProjection(typeParameterDescriptor, javaTypeAttributes);
|
||||
} else {
|
||||
AnnotationDescriptor extractNullabilityAnnotationOnBoundedWildcard = UtilsKt.extractNullabilityAnnotationOnBoundedWildcard(this.f7134c, javaWildcardType);
|
||||
KotlinType transformJavaType = transformJavaType(bound, JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, false, false, null, 7, null));
|
||||
if (extractNullabilityAnnotationOnBoundedWildcard != null) {
|
||||
transformJavaType = TypeUtilsKt.replaceAnnotations(transformJavaType, Annotations.Companion.create(CollectionsKt.plus(transformJavaType.getAnnotations(), extractNullabilityAnnotationOnBoundedWildcard)));
|
||||
}
|
||||
makeStarProjection = TypeUtilsKt.createProjection(transformJavaType, variance, typeParameterDescriptor);
|
||||
}
|
||||
Intrinsics.checkNotNull(makeStarProjection);
|
||||
return makeStarProjection;
|
||||
}
|
||||
|
||||
public final KotlinType transformArrayType(JavaArrayType arrayType, JavaTypeAttributes attr, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(arrayType, "arrayType");
|
||||
Intrinsics.checkNotNullParameter(attr, "attr");
|
||||
JavaType componentType = arrayType.getComponentType();
|
||||
JavaPrimitiveType javaPrimitiveType = componentType instanceof JavaPrimitiveType ? (JavaPrimitiveType) componentType : null;
|
||||
PrimitiveType type = javaPrimitiveType != null ? javaPrimitiveType.getType() : null;
|
||||
LazyJavaAnnotations lazyJavaAnnotations = new LazyJavaAnnotations(this.f7134c, arrayType, true);
|
||||
if (type != null) {
|
||||
SimpleType primitiveArrayKotlinType = this.f7134c.getModule().getBuiltIns().getPrimitiveArrayKotlinType(type);
|
||||
Intrinsics.checkNotNull(primitiveArrayKotlinType);
|
||||
KotlinType replaceAnnotations = TypeUtilsKt.replaceAnnotations(primitiveArrayKotlinType, new CompositeAnnotations(primitiveArrayKotlinType.getAnnotations(), lazyJavaAnnotations));
|
||||
Intrinsics.checkNotNull(replaceAnnotations, "null cannot be cast to non-null type org.jetbrains.kotlin.types.SimpleType");
|
||||
SimpleType simpleType = (SimpleType) replaceAnnotations;
|
||||
return attr.isForAnnotationParameter() ? simpleType : KotlinTypeFactory.flexibleType(simpleType, simpleType.makeNullableAsSpecified(true));
|
||||
}
|
||||
KotlinType transformJavaType = transformJavaType(componentType, JavaTypeAttributesKt.toAttributes$default(TypeUsage.COMMON, attr.isForAnnotationParameter(), false, null, 6, null));
|
||||
if (attr.isForAnnotationParameter()) {
|
||||
SimpleType arrayType2 = this.f7134c.getModule().getBuiltIns().getArrayType(z3 ? Variance.OUT_VARIANCE : Variance.INVARIANT, transformJavaType, lazyJavaAnnotations);
|
||||
Intrinsics.checkNotNullExpressionValue(arrayType2, "getArrayType(...)");
|
||||
return arrayType2;
|
||||
}
|
||||
SimpleType arrayType3 = this.f7134c.getModule().getBuiltIns().getArrayType(Variance.INVARIANT, transformJavaType, lazyJavaAnnotations);
|
||||
Intrinsics.checkNotNullExpressionValue(arrayType3, "getArrayType(...)");
|
||||
return KotlinTypeFactory.flexibleType(arrayType3, this.f7134c.getModule().getBuiltIns().getArrayType(Variance.OUT_VARIANCE, transformJavaType, lazyJavaAnnotations).makeNullableAsSpecified(true));
|
||||
}
|
||||
|
||||
public final KotlinType transformJavaType(JavaType javaType, JavaTypeAttributes attr) {
|
||||
KotlinType transformJavaType;
|
||||
Intrinsics.checkNotNullParameter(attr, "attr");
|
||||
if (javaType instanceof JavaPrimitiveType) {
|
||||
PrimitiveType type = ((JavaPrimitiveType) javaType).getType();
|
||||
SimpleType primitiveKotlinType = type != null ? this.f7134c.getModule().getBuiltIns().getPrimitiveKotlinType(type) : this.f7134c.getModule().getBuiltIns().getUnitType();
|
||||
Intrinsics.checkNotNull(primitiveKotlinType);
|
||||
return primitiveKotlinType;
|
||||
}
|
||||
if (javaType instanceof JavaClassifierType) {
|
||||
return transformJavaClassifierType((JavaClassifierType) javaType, attr);
|
||||
}
|
||||
if (javaType instanceof JavaArrayType) {
|
||||
return transformArrayType$default(this, (JavaArrayType) javaType, attr, false, 4, null);
|
||||
}
|
||||
if (javaType instanceof JavaWildcardType) {
|
||||
JavaType bound = ((JavaWildcardType) javaType).getBound();
|
||||
if (bound != null && (transformJavaType = transformJavaType(bound, attr)) != null) {
|
||||
return transformJavaType;
|
||||
}
|
||||
SimpleType defaultBound = this.f7134c.getModule().getBuiltIns().getDefaultBound();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultBound, "getDefaultBound(...)");
|
||||
return defaultBound;
|
||||
}
|
||||
if (javaType == null) {
|
||||
SimpleType defaultBound2 = this.f7134c.getModule().getBuiltIns().getDefaultBound();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultBound2, "getDefaultBound(...)");
|
||||
return defaultBound2;
|
||||
}
|
||||
throw new UnsupportedOperationException("Unsupported type: " + javaType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class JavaTypeResolverKt {
|
||||
private static final FqName JAVA_LANG_CLASS_FQ_NAME = new FqName("java.lang.Class");
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.ErasureProjectionComputer;
|
||||
import kotlin.reflect.jvm.internal.impl.types.ErasureTypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeParameterUpperBoundEraser;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RawProjectionComputer extends ErasureProjectionComputer {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[JavaTypeFlexibility.values().length];
|
||||
try {
|
||||
iArr[JavaTypeFlexibility.FLEXIBLE_LOWER_BOUND.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[JavaTypeFlexibility.FLEXIBLE_UPPER_BOUND.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
iArr[JavaTypeFlexibility.INFLEXIBLE.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.ErasureProjectionComputer
|
||||
public TypeProjection computeProjection(TypeParameterDescriptor parameter, ErasureTypeAttributes typeAttr, TypeParameterUpperBoundEraser typeParameterUpperBoundEraser, KotlinType erasedUpperBound) {
|
||||
TypeProjection typeProjectionImpl;
|
||||
Intrinsics.checkNotNullParameter(parameter, "parameter");
|
||||
Intrinsics.checkNotNullParameter(typeAttr, "typeAttr");
|
||||
Intrinsics.checkNotNullParameter(typeParameterUpperBoundEraser, "typeParameterUpperBoundEraser");
|
||||
Intrinsics.checkNotNullParameter(erasedUpperBound, "erasedUpperBound");
|
||||
if (!(typeAttr instanceof JavaTypeAttributes)) {
|
||||
return super.computeProjection(parameter, typeAttr, typeParameterUpperBoundEraser, erasedUpperBound);
|
||||
}
|
||||
JavaTypeAttributes javaTypeAttributes = (JavaTypeAttributes) typeAttr;
|
||||
if (!javaTypeAttributes.isRaw()) {
|
||||
javaTypeAttributes = javaTypeAttributes.withFlexibility(JavaTypeFlexibility.INFLEXIBLE);
|
||||
}
|
||||
int i = WhenMappings.$EnumSwitchMapping$0[javaTypeAttributes.getFlexibility().ordinal()];
|
||||
if (i == 1) {
|
||||
return new TypeProjectionImpl(Variance.INVARIANT, erasedUpperBound);
|
||||
}
|
||||
if (i != 2 && i != 3) {
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
if (parameter.getVariance().getAllowsOutPosition()) {
|
||||
List<TypeParameterDescriptor> parameters = erasedUpperBound.getConstructor().getParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(parameters, "getParameters(...)");
|
||||
typeProjectionImpl = !parameters.isEmpty() ? new TypeProjectionImpl(Variance.OUT_VARIANCE, erasedUpperBound) : TypeUtils.makeStarProjection(parameter, javaTypeAttributes);
|
||||
} else {
|
||||
typeProjectionImpl = new TypeProjectionImpl(Variance.INVARIANT, DescriptorUtilsKt.getBuiltIns(parameter).getNothingType());
|
||||
}
|
||||
Intrinsics.checkNotNull(typeProjectionImpl);
|
||||
return typeProjectionImpl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.ErasureProjectionComputer;
|
||||
import kotlin.reflect.jvm.internal.impl.types.FlexibleTypesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeParameterUpperBoundEraser;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUsage;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorTypeKind;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
|
||||
import kotlin.text.Typography;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nRawSubstitution.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RawSubstitution.kt\norg/jetbrains/kotlin/load/java/lazy/types/RawSubstitution\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,95:1\n1549#2:96\n1620#2,3:97\n*S KotlinDebug\n*F\n+ 1 RawSubstitution.kt\norg/jetbrains/kotlin/load/java/lazy/types/RawSubstitution\n*L\n73#1:96\n73#1:97,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RawSubstitution extends TypeSubstitution {
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final JavaTypeAttributes lowerTypeAttr;
|
||||
private static final JavaTypeAttributes upperTypeAttr;
|
||||
private final RawProjectionComputer projectionComputer;
|
||||
private final TypeParameterUpperBoundEraser typeParameterUpperBoundEraser;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
TypeUsage typeUsage = TypeUsage.COMMON;
|
||||
lowerTypeAttr = JavaTypeAttributesKt.toAttributes$default(typeUsage, false, true, null, 5, null).withFlexibility(JavaTypeFlexibility.FLEXIBLE_LOWER_BOUND);
|
||||
upperTypeAttr = JavaTypeAttributesKt.toAttributes$default(typeUsage, false, true, null, 5, null).withFlexibility(JavaTypeFlexibility.FLEXIBLE_UPPER_BOUND);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public RawSubstitution() {
|
||||
this(null, 1, 0 == true ? 1 : 0);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final Pair<SimpleType, Boolean> eraseInflexibleBasedOnClassDescriptor(final SimpleType simpleType, final ClassDescriptor classDescriptor, final JavaTypeAttributes javaTypeAttributes) {
|
||||
int collectionSizeOrDefault;
|
||||
if (simpleType.getConstructor().getParameters().isEmpty()) {
|
||||
return TuplesKt.to(simpleType, Boolean.FALSE);
|
||||
}
|
||||
if (KotlinBuiltIns.isArray(simpleType)) {
|
||||
TypeProjection typeProjection = simpleType.getArguments().get(0);
|
||||
Variance projectionKind = typeProjection.getProjectionKind();
|
||||
KotlinType type = typeProjection.getType();
|
||||
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
|
||||
return TuplesKt.to(KotlinTypeFactory.simpleType$default(simpleType.getAttributes(), simpleType.getConstructor(), CollectionsKt.listOf(new TypeProjectionImpl(projectionKind, eraseType(type, javaTypeAttributes))), simpleType.isMarkedNullable(), (KotlinTypeRefiner) null, 16, (Object) null), Boolean.FALSE);
|
||||
}
|
||||
if (KotlinTypeKt.isError(simpleType)) {
|
||||
return TuplesKt.to(ErrorUtils.createErrorType(ErrorTypeKind.ERROR_RAW_TYPE, simpleType.getConstructor().toString()), Boolean.FALSE);
|
||||
}
|
||||
MemberScope memberScope = classDescriptor.getMemberScope(this);
|
||||
Intrinsics.checkNotNullExpressionValue(memberScope, "getMemberScope(...)");
|
||||
TypeAttributes attributes = simpleType.getAttributes();
|
||||
TypeConstructor typeConstructor = classDescriptor.getTypeConstructor();
|
||||
Intrinsics.checkNotNullExpressionValue(typeConstructor, "getTypeConstructor(...)");
|
||||
List<TypeParameterDescriptor> parameters = classDescriptor.getTypeConstructor().getParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(parameters, "getParameters(...)");
|
||||
List<TypeParameterDescriptor> list = parameters;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (TypeParameterDescriptor typeParameterDescriptor : list) {
|
||||
RawProjectionComputer rawProjectionComputer = this.projectionComputer;
|
||||
Intrinsics.checkNotNull(typeParameterDescriptor);
|
||||
arrayList.add(ErasureProjectionComputer.computeProjection$default(rawProjectionComputer, typeParameterDescriptor, javaTypeAttributes, this.typeParameterUpperBoundEraser, null, 8, null));
|
||||
}
|
||||
return TuplesKt.to(KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(attributes, typeConstructor, arrayList, simpleType.isMarkedNullable(), memberScope, new Function1<KotlinTypeRefiner, SimpleType>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.types.RawSubstitution$eraseInflexibleBasedOnClassDescriptor$2
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final SimpleType invoke(KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
ClassId classId;
|
||||
ClassDescriptor findClassAcrossModuleDependencies;
|
||||
Pair eraseInflexibleBasedOnClassDescriptor;
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
|
||||
ClassDescriptor classDescriptor2 = ClassDescriptor.this;
|
||||
if (classDescriptor2 == null) {
|
||||
classDescriptor2 = null;
|
||||
}
|
||||
if (classDescriptor2 == null || (classId = DescriptorUtilsKt.getClassId(classDescriptor2)) == null || (findClassAcrossModuleDependencies = kotlinTypeRefiner.findClassAcrossModuleDependencies(classId)) == null || Intrinsics.areEqual(findClassAcrossModuleDependencies, ClassDescriptor.this)) {
|
||||
return null;
|
||||
}
|
||||
eraseInflexibleBasedOnClassDescriptor = this.eraseInflexibleBasedOnClassDescriptor(simpleType, findClassAcrossModuleDependencies, javaTypeAttributes);
|
||||
return (SimpleType) eraseInflexibleBasedOnClassDescriptor.getFirst();
|
||||
}
|
||||
}), Boolean.TRUE);
|
||||
}
|
||||
|
||||
private final KotlinType eraseType(KotlinType kotlinType, JavaTypeAttributes javaTypeAttributes) {
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
|
||||
if (mo1394getDeclarationDescriptor instanceof TypeParameterDescriptor) {
|
||||
return eraseType(this.typeParameterUpperBoundEraser.getErasedUpperBound((TypeParameterDescriptor) mo1394getDeclarationDescriptor, javaTypeAttributes.markIsRaw(true)), javaTypeAttributes);
|
||||
}
|
||||
if (!(mo1394getDeclarationDescriptor instanceof ClassDescriptor)) {
|
||||
throw new IllegalStateException(("Unexpected declaration kind: " + mo1394getDeclarationDescriptor).toString());
|
||||
}
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor2 = FlexibleTypesKt.upperIfFlexible(kotlinType).getConstructor().mo1394getDeclarationDescriptor();
|
||||
if (mo1394getDeclarationDescriptor2 instanceof ClassDescriptor) {
|
||||
Pair<SimpleType, Boolean> eraseInflexibleBasedOnClassDescriptor = eraseInflexibleBasedOnClassDescriptor(FlexibleTypesKt.lowerIfFlexible(kotlinType), (ClassDescriptor) mo1394getDeclarationDescriptor, lowerTypeAttr);
|
||||
SimpleType component1 = eraseInflexibleBasedOnClassDescriptor.component1();
|
||||
boolean booleanValue = eraseInflexibleBasedOnClassDescriptor.component2().booleanValue();
|
||||
Pair<SimpleType, Boolean> eraseInflexibleBasedOnClassDescriptor2 = eraseInflexibleBasedOnClassDescriptor(FlexibleTypesKt.upperIfFlexible(kotlinType), (ClassDescriptor) mo1394getDeclarationDescriptor2, upperTypeAttr);
|
||||
SimpleType component12 = eraseInflexibleBasedOnClassDescriptor2.component1();
|
||||
return (booleanValue || eraseInflexibleBasedOnClassDescriptor2.component2().booleanValue()) ? new RawTypeImpl(component1, component12) : KotlinTypeFactory.flexibleType(component1, component12);
|
||||
}
|
||||
throw new IllegalStateException(("For some reason declaration for upper bound is not a class but \"" + mo1394getDeclarationDescriptor2 + "\" while for lower it's \"" + mo1394getDeclarationDescriptor + Typography.quote).toString());
|
||||
}
|
||||
|
||||
public static /* synthetic */ KotlinType eraseType$default(RawSubstitution rawSubstitution, KotlinType kotlinType, JavaTypeAttributes javaTypeAttributes, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
javaTypeAttributes = new JavaTypeAttributes(TypeUsage.COMMON, null, false, false, null, null, 62, null);
|
||||
}
|
||||
return rawSubstitution.eraseType(kotlinType, javaTypeAttributes);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSubstitution
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public RawSubstitution(TypeParameterUpperBoundEraser typeParameterUpperBoundEraser) {
|
||||
RawProjectionComputer rawProjectionComputer = new RawProjectionComputer();
|
||||
this.projectionComputer = rawProjectionComputer;
|
||||
this.typeParameterUpperBoundEraser = typeParameterUpperBoundEraser == null ? new TypeParameterUpperBoundEraser(rawProjectionComputer, null, 2, null) : typeParameterUpperBoundEraser;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.TypeSubstitution
|
||||
/* renamed from: get */
|
||||
public TypeProjectionImpl mo1399get(KotlinType key) {
|
||||
Intrinsics.checkNotNullParameter(key, "key");
|
||||
return new TypeProjectionImpl(eraseType$default(this, key, null, 2, null));
|
||||
}
|
||||
|
||||
public /* synthetic */ RawSubstitution(TypeParameterUpperBoundEraser typeParameterUpperBoundEraser, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this((i & 1) != 0 ? null : typeParameterUpperBoundEraser);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types;
|
||||
|
||||
import com.adif.elcanomovil.repositories.circulation.CirculationMapper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.CollectionsKt___CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRenderer;
|
||||
import kotlin.reflect.jvm.internal.impl.renderer.DescriptorRendererOptions;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.FlexibleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.RawType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeParameterUpperBoundEraser;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeChecker;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.KotlinTypeMarker;
|
||||
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
|
||||
import kotlin.text.StringsKt__StringsKt;
|
||||
import kotlin.text.Typography;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nRawType.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RawType.kt\norg/jetbrains/kotlin/load/java/lazy/types/RawTypeImpl\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,98:1\n1726#2,3:99\n1549#2:102\n1620#2,3:103\n*S KotlinDebug\n*F\n+ 1 RawType.kt\norg/jetbrains/kotlin/load/java/lazy/types/RawTypeImpl\n*L\n80#1:99,3\n61#1:102\n61#1:103,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class RawTypeImpl extends FlexibleType implements RawType {
|
||||
private RawTypeImpl(SimpleType simpleType, SimpleType simpleType2, boolean z3) {
|
||||
super(simpleType, simpleType2);
|
||||
if (z3) {
|
||||
return;
|
||||
}
|
||||
KotlinTypeChecker.DEFAULT.isSubtypeOf(simpleType, simpleType2);
|
||||
}
|
||||
|
||||
private static final boolean render$onlyOutDiffers(String str, String str2) {
|
||||
String removePrefix;
|
||||
removePrefix = StringsKt__StringsKt.removePrefix(str2, (CharSequence) "out ");
|
||||
return Intrinsics.areEqual(str, removePrefix) || Intrinsics.areEqual(str2, CirculationMapper.VIA_ASTERISK);
|
||||
}
|
||||
|
||||
private static final List<String> render$renderArguments(DescriptorRenderer descriptorRenderer, KotlinType kotlinType) {
|
||||
int collectionSizeOrDefault;
|
||||
List<TypeProjection> arguments = kotlinType.getArguments();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arguments, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = arguments.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(descriptorRenderer.renderTypeProjection((TypeProjection) it.next()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static final String render$replaceArgs(String str, String str2) {
|
||||
boolean contains$default;
|
||||
String substringBefore$default;
|
||||
String substringAfterLast$default;
|
||||
contains$default = StringsKt__StringsKt.contains$default(str, Typography.less, false, 2, (Object) null);
|
||||
if (!contains$default) {
|
||||
return str;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
substringBefore$default = StringsKt__StringsKt.substringBefore$default(str, Typography.less, (String) null, 2, (Object) null);
|
||||
sb.append(substringBefore$default);
|
||||
sb.append(Typography.less);
|
||||
sb.append(str2);
|
||||
sb.append(Typography.greater);
|
||||
substringAfterLast$default = StringsKt__StringsKt.substringAfterLast$default(str, Typography.greater, (String) null, 2, (Object) null);
|
||||
sb.append(substringAfterLast$default);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.FlexibleType
|
||||
public SimpleType getDelegate() {
|
||||
return getLowerBound();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.FlexibleType, kotlin.reflect.jvm.internal.impl.types.KotlinType
|
||||
public MemberScope getMemberScope() {
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = getConstructor().mo1394getDeclarationDescriptor();
|
||||
TypeParameterUpperBoundEraser typeParameterUpperBoundEraser = null;
|
||||
Object[] objArr = 0;
|
||||
ClassDescriptor classDescriptor = mo1394getDeclarationDescriptor instanceof ClassDescriptor ? (ClassDescriptor) mo1394getDeclarationDescriptor : null;
|
||||
if (classDescriptor != null) {
|
||||
MemberScope memberScope = classDescriptor.getMemberScope(new RawSubstitution(typeParameterUpperBoundEraser, 1, objArr == true ? 1 : 0));
|
||||
Intrinsics.checkNotNullExpressionValue(memberScope, "getMemberScope(...)");
|
||||
return memberScope;
|
||||
}
|
||||
throw new IllegalStateException(("Incorrect classifier: " + getConstructor().mo1394getDeclarationDescriptor()).toString());
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.FlexibleType
|
||||
public String render(DescriptorRenderer renderer, DescriptorRendererOptions options) {
|
||||
String joinToString$default;
|
||||
Intrinsics.checkNotNullParameter(renderer, "renderer");
|
||||
Intrinsics.checkNotNullParameter(options, "options");
|
||||
String renderType = renderer.renderType(getLowerBound());
|
||||
String renderType2 = renderer.renderType(getUpperBound());
|
||||
if (options.getDebugMode()) {
|
||||
return "raw (" + renderType + ".." + renderType2 + ')';
|
||||
}
|
||||
if (getUpperBound().getArguments().isEmpty()) {
|
||||
return renderer.renderFlexibleType(renderType, renderType2, TypeUtilsKt.getBuiltIns(this));
|
||||
}
|
||||
List<String> render$renderArguments = render$renderArguments(renderer, getLowerBound());
|
||||
List<String> render$renderArguments2 = render$renderArguments(renderer, getUpperBound());
|
||||
List<String> list = render$renderArguments;
|
||||
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(list, ", ", null, null, 0, null, new Function1<String, CharSequence>() { // from class: kotlin.reflect.jvm.internal.impl.load.java.lazy.types.RawTypeImpl$render$newArgs$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final CharSequence invoke(String it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return "(raw) " + it;
|
||||
}
|
||||
}, 30, null);
|
||||
List<Pair> zip = CollectionsKt.zip(list, render$renderArguments2);
|
||||
if (!(zip instanceof Collection) || !zip.isEmpty()) {
|
||||
for (Pair pair : zip) {
|
||||
if (!render$onlyOutDiffers((String) pair.getFirst(), (String) pair.getSecond())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
renderType2 = render$replaceArgs(renderType2, joinToString$default);
|
||||
String render$replaceArgs = render$replaceArgs(renderType, joinToString$default);
|
||||
return Intrinsics.areEqual(render$replaceArgs, renderType2) ? render$replaceArgs : renderer.renderFlexibleType(render$replaceArgs, renderType2, TypeUtilsKt.getBuiltIns(this));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType
|
||||
public RawTypeImpl makeNullableAsSpecified(boolean z3) {
|
||||
return new RawTypeImpl(getLowerBound().makeNullableAsSpecified(z3), getUpperBound().makeNullableAsSpecified(z3));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType
|
||||
public RawTypeImpl replaceAttributes(TypeAttributes newAttributes) {
|
||||
Intrinsics.checkNotNullParameter(newAttributes, "newAttributes");
|
||||
return new RawTypeImpl(getLowerBound().replaceAttributes(newAttributes), getUpperBound().replaceAttributes(newAttributes));
|
||||
}
|
||||
|
||||
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
||||
public RawTypeImpl(SimpleType lowerBound, SimpleType upperBound) {
|
||||
this(lowerBound, upperBound, false);
|
||||
Intrinsics.checkNotNullParameter(lowerBound, "lowerBound");
|
||||
Intrinsics.checkNotNullParameter(upperBound, "upperBound");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.types.UnwrappedType, kotlin.reflect.jvm.internal.impl.types.KotlinType
|
||||
public FlexibleType refine(KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
|
||||
KotlinType refineType = kotlinTypeRefiner.refineType((KotlinTypeMarker) getLowerBound());
|
||||
Intrinsics.checkNotNull(refineType, "null cannot be cast to non-null type org.jetbrains.kotlin.types.SimpleType");
|
||||
KotlinType refineType2 = kotlinTypeRefiner.refineType((KotlinTypeMarker) getUpperBound());
|
||||
Intrinsics.checkNotNull(refineType2, "null cannot be cast to non-null type org.jetbrains.kotlin.types.SimpleType");
|
||||
return new RawTypeImpl((SimpleType) refineType, (SimpleType) refineType2, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.sources;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaElement;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaSourceElement extends SourceElement {
|
||||
JavaElement getJavaElement();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.sources;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.structure.JavaElement;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaSourceElementFactory {
|
||||
JavaSourceElement source(JavaElement javaElement);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaAnnotation extends JavaElement {
|
||||
Collection<JavaAnnotationArgument> getArguments();
|
||||
|
||||
ClassId getClassId();
|
||||
|
||||
boolean isFreshlySupportedTypeUseAnnotation();
|
||||
|
||||
boolean isIdeExternalAnnotation();
|
||||
|
||||
JavaClass resolve();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaAnnotationArgument {
|
||||
Name getName();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaAnnotationAsAnnotationArgument extends JavaAnnotationArgument {
|
||||
JavaAnnotation getAnnotation();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaAnnotationOwner extends JavaElement {
|
||||
JavaAnnotation findAnnotation(FqName fqName);
|
||||
|
||||
Collection<JavaAnnotation> getAnnotations();
|
||||
|
||||
boolean isDeprecatedInJavaDoc();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaArrayAnnotationArgument extends JavaAnnotationArgument {
|
||||
List<JavaAnnotationArgument> getElements();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaArrayType extends JavaType {
|
||||
JavaType getComponentType();
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClass extends JavaClassifier, JavaModifierListOwner, JavaTypeParameterListOwner {
|
||||
Collection<JavaConstructor> getConstructors();
|
||||
|
||||
Collection<JavaField> getFields();
|
||||
|
||||
FqName getFqName();
|
||||
|
||||
Collection<Name> getInnerClassNames();
|
||||
|
||||
LightClassOriginKind getLightClassOriginKind();
|
||||
|
||||
Collection<JavaMethod> getMethods();
|
||||
|
||||
JavaClass getOuterClass();
|
||||
|
||||
Collection<JavaClassifierType> getPermittedTypes();
|
||||
|
||||
Collection<JavaRecordComponent> getRecordComponents();
|
||||
|
||||
Collection<JavaClassifierType> getSupertypes();
|
||||
|
||||
boolean hasDefaultConstructor();
|
||||
|
||||
boolean isAnnotationType();
|
||||
|
||||
boolean isEnum();
|
||||
|
||||
boolean isInterface();
|
||||
|
||||
boolean isRecord();
|
||||
|
||||
boolean isSealed();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClassObjectAnnotationArgument extends JavaAnnotationArgument {
|
||||
JavaType getReferencedType();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.load.java.structure;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface JavaClassifier extends JavaAnnotationOwner, JavaNamedElement {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user