Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.

This commit is contained in:
2025-12-04 13:59:54 +01:00
parent f2fd1c3bf5
commit e0133d2ca2
10432 changed files with 1019085 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.ServiceLoader;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
/* loaded from: classes3.dex */
public interface BuiltInsLoader {
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 Lazy<BuiltInsLoader> Instance$delegate = LazyKt.lazy(LazyThreadSafetyMode.PUBLICATION, (Function0) new Function0<BuiltInsLoader>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader$Companion$Instance$2
@Override // kotlin.jvm.functions.Function0
public final BuiltInsLoader invoke() {
ServiceLoader load = ServiceLoader.load(BuiltInsLoader.class, BuiltInsLoader.class.getClassLoader());
Intrinsics.checkNotNull(load);
BuiltInsLoader builtInsLoader = (BuiltInsLoader) CollectionsKt.firstOrNull(load);
if (builtInsLoader != null) {
return builtInsLoader;
}
throw new IllegalStateException("No BuiltInsLoader implementation was found. Please ensure that the META-INF/services/ is not stripped from your application and that the Java virtual machine is not running under a security manager");
}
});
private Companion() {
}
public final BuiltInsLoader getInstance() {
return Instance$delegate.getValue();
}
}
PackageFragmentProvider createPackageFragmentProvider(StorageManager storageManager, ModuleDescriptor moduleDescriptor, Iterable<? extends ClassDescriptorFactory> iterable, PlatformDependentDeclarationFilter platformDependentDeclarationFilter, AdditionalClassPartsProvider additionalClassPartsProvider, boolean z3);
}

View File

@@ -0,0 +1,7 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
/* loaded from: classes3.dex */
public interface BuiltInsPackageFragment extends PackageFragmentDescriptor {
}

View File

@@ -0,0 +1,59 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
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.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
@SourceDebugExtension({"SMAP\nCompanionObjectMapping.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CompanionObjectMapping.kt\norg/jetbrains/kotlin/builtins/CompanionObjectMapping\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,20:1\n1549#2:21\n1620#2,3:22\n1620#2,3:25\n*S KotlinDebug\n*F\n+ 1 CompanionObjectMapping.kt\norg/jetbrains/kotlin/builtins/CompanionObjectMapping\n*L\n12#1:21\n12#1:22,3\n16#1:25,3\n*E\n"})
/* loaded from: classes3.dex */
public final class CompanionObjectMapping {
public static final CompanionObjectMapping INSTANCE = new CompanionObjectMapping();
private static final Set<ClassId> classIds;
static {
int collectionSizeOrDefault;
Set<PrimitiveType> set = PrimitiveType.NUMBER_TYPES;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(set, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = set.iterator();
while (it.hasNext()) {
arrayList.add(StandardNames.getPrimitiveFqName((PrimitiveType) it.next()));
}
FqName safe = StandardNames.FqNames.string.toSafe();
Intrinsics.checkNotNullExpressionValue(safe, "toSafe(...)");
List plus = CollectionsKt.plus((Collection<? extends FqName>) arrayList, safe);
FqName safe2 = StandardNames.FqNames._boolean.toSafe();
Intrinsics.checkNotNullExpressionValue(safe2, "toSafe(...)");
List plus2 = CollectionsKt.plus((Collection<? extends FqName>) plus, safe2);
FqName safe3 = StandardNames.FqNames._enum.toSafe();
Intrinsics.checkNotNullExpressionValue(safe3, "toSafe(...)");
List plus3 = CollectionsKt.plus((Collection<? extends FqName>) plus2, safe3);
LinkedHashSet linkedHashSet = new LinkedHashSet();
Iterator it2 = plus3.iterator();
while (it2.hasNext()) {
linkedHashSet.add(ClassId.topLevel((FqName) it2.next()));
}
classIds = linkedHashSet;
}
private CompanionObjectMapping() {
}
public final Set<ClassId> allClassesWithIntrinsicCompanions() {
return classIds;
}
public final Set<ClassId> getClassIds() {
return classIds;
}
}

View File

@@ -0,0 +1,23 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
/* loaded from: classes3.dex */
public final class CompanionObjectMappingUtilsKt {
public static final boolean isMappedIntrinsicCompanionObject(CompanionObjectMapping companionObjectMapping, ClassDescriptor classDescriptor) {
Intrinsics.checkNotNullParameter(companionObjectMapping, "<this>");
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
if (!DescriptorUtils.isCompanionObject(classDescriptor)) {
return false;
}
Set<ClassId> classIds = companionObjectMapping.getClassIds();
ClassId classId = DescriptorUtilsKt.getClassId(classDescriptor);
return CollectionsKt.contains(classIds, classId != null ? classId.getOuterClassId() : null);
}
}

View File

@@ -0,0 +1,47 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager;
/* loaded from: classes3.dex */
public final class DefaultBuiltIns extends KotlinBuiltIns {
public static final Companion Companion = new Companion(null);
private static final Lazy<DefaultBuiltIns> Instance$delegate = LazyKt.lazy(new Function0<DefaultBuiltIns>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.DefaultBuiltIns$Companion$Instance$2
@Override // kotlin.jvm.functions.Function0
public final DefaultBuiltIns invoke() {
return new DefaultBuiltIns(false, 1, null);
}
});
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final DefaultBuiltIns getInstance() {
return (DefaultBuiltIns) DefaultBuiltIns.Instance$delegate.getValue();
}
private Companion() {
}
}
public DefaultBuiltIns() {
this(false, 1, null);
}
public DefaultBuiltIns(boolean z3) {
super(new LockBasedStorageManager("DefaultBuiltIns"));
if (z3) {
createBuiltInsModule(false);
}
}
public /* synthetic */ DefaultBuiltIns(boolean z3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? true : z3);
}
}

View File

@@ -0,0 +1,5 @@
package kotlin.reflect.jvm.internal.impl.builtins;
/* loaded from: classes3.dex */
public interface FunctionInterfacePackageFragment extends BuiltInsPackageFragment {
}

View File

@@ -0,0 +1,262 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.MapsKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.JvmOverloads;
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.functions.FunctionTypeKind;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKindExtractor;
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.annotations.AnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.BuiltInAnnotationDescriptor;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
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.IntValue;
import kotlin.reflect.jvm.internal.impl.resolve.constants.StringValue;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
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.TypeAttributesKt;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
@SourceDebugExtension({"SMAP\nfunctionTypes.kt\nKotlin\n*S Kotlin\n*F\n+ 1 functionTypes.kt\norg/jetbrains/kotlin/builtins/FunctionTypesKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,301:1\n1#2:302\n1549#3:303\n1620#3,3:304\n223#3,2:307\n1549#3:309\n1620#3,3:310\n1549#3:313\n1620#3,3:314\n1590#3,4:317\n*S KotlinDebug\n*F\n+ 1 functionTypes.kt\norg/jetbrains/kotlin/builtins/FunctionTypesKt\n*L\n160#1:303\n160#1:304,3\n195#1:307,2\n200#1:309\n200#1:310,3\n222#1:313\n222#1:314,3\n225#1:317,4\n*E\n"})
/* loaded from: classes3.dex */
public final class FunctionTypesKt {
public static final int contextFunctionTypeParamsCount(KotlinType kotlinType) {
Object value;
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
AnnotationDescriptor mo1389findAnnotation = kotlinType.getAnnotations().mo1389findAnnotation(StandardNames.FqNames.contextFunctionTypeParams);
if (mo1389findAnnotation == null) {
return 0;
}
value = MapsKt__MapsKt.getValue(mo1389findAnnotation.getAllValueArguments(), StandardNames.CONTEXT_FUNCTION_TYPE_PARAMETER_COUNT_NAME);
ConstantValue constantValue = (ConstantValue) value;
Intrinsics.checkNotNull(constantValue, "null cannot be cast to non-null type org.jetbrains.kotlin.resolve.constants.IntValue");
return ((IntValue) constantValue).getValue().intValue();
}
@JvmOverloads
public static final SimpleType createFunctionType(KotlinBuiltIns builtIns, Annotations annotations, KotlinType kotlinType, List<? extends KotlinType> contextReceiverTypes, List<? extends KotlinType> parameterTypes, List<Name> list, KotlinType returnType, boolean z3) {
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
Intrinsics.checkNotNullParameter(annotations, "annotations");
Intrinsics.checkNotNullParameter(contextReceiverTypes, "contextReceiverTypes");
Intrinsics.checkNotNullParameter(parameterTypes, "parameterTypes");
Intrinsics.checkNotNullParameter(returnType, "returnType");
List<TypeProjection> functionTypeArgumentProjections = getFunctionTypeArgumentProjections(kotlinType, contextReceiverTypes, parameterTypes, list, returnType, builtIns);
ClassDescriptor functionDescriptor = getFunctionDescriptor(builtIns, contextReceiverTypes.size() + parameterTypes.size() + (kotlinType == null ? 0 : 1), z3);
if (kotlinType != null) {
annotations = withExtensionFunctionAnnotation(annotations, builtIns);
}
if (!contextReceiverTypes.isEmpty()) {
annotations = withContextReceiversFunctionAnnotation(annotations, builtIns, contextReceiverTypes.size());
}
return KotlinTypeFactory.simpleNotNullType(TypeAttributesKt.toDefaultAttributes(annotations), functionDescriptor, functionTypeArgumentProjections);
}
public static final Name extractParameterNameFromFunctionTypeArgument(KotlinType kotlinType) {
String value;
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
AnnotationDescriptor mo1389findAnnotation = kotlinType.getAnnotations().mo1389findAnnotation(StandardNames.FqNames.parameterName);
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) {
if (!Name.isValidIdentifier(value)) {
value = null;
}
if (value != null) {
return Name.identifier(value);
}
}
return null;
}
public static final List<KotlinType> getContextReceiverTypesFromFunctionType(KotlinType kotlinType) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
isBuiltinFunctionalType(kotlinType);
int contextFunctionTypeParamsCount = contextFunctionTypeParamsCount(kotlinType);
if (contextFunctionTypeParamsCount == 0) {
return CollectionsKt.emptyList();
}
List<TypeProjection> subList = kotlinType.getArguments().subList(0, contextFunctionTypeParamsCount);
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(subList, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = subList.iterator();
while (it.hasNext()) {
KotlinType type = ((TypeProjection) it.next()).getType();
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
arrayList.add(type);
}
return arrayList;
}
public static final ClassDescriptor getFunctionDescriptor(KotlinBuiltIns builtIns, int i, boolean z3) {
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
ClassDescriptor suspendFunction = z3 ? builtIns.getSuspendFunction(i) : builtIns.getFunction(i);
Intrinsics.checkNotNull(suspendFunction);
return suspendFunction;
}
public static final List<TypeProjection> getFunctionTypeArgumentProjections(KotlinType kotlinType, List<? extends KotlinType> contextReceiverTypes, List<? extends KotlinType> parameterTypes, List<Name> list, KotlinType returnType, KotlinBuiltIns builtIns) {
int collectionSizeOrDefault;
Name name;
KotlinBuiltIns kotlinBuiltIns;
Intrinsics.checkNotNullParameter(contextReceiverTypes, "contextReceiverTypes");
Intrinsics.checkNotNullParameter(parameterTypes, "parameterTypes");
Intrinsics.checkNotNullParameter(returnType, "returnType");
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
int i = 0;
ArrayList arrayList = new ArrayList(contextReceiverTypes.size() + parameterTypes.size() + (kotlinType != null ? 1 : 0) + 1);
List<? extends KotlinType> list2 = contextReceiverTypes;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = list2.iterator();
while (it.hasNext()) {
arrayList2.add(TypeUtilsKt.asTypeProjection((KotlinType) it.next()));
}
arrayList.addAll(arrayList2);
kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.addIfNotNull(arrayList, kotlinType != null ? TypeUtilsKt.asTypeProjection(kotlinType) : null);
for (Object obj : parameterTypes) {
int i4 = i + 1;
if (i < 0) {
CollectionsKt.throwIndexOverflow();
}
KotlinType kotlinType2 = (KotlinType) obj;
if (list == null || (name = list.get(i)) == null || name.isSpecial()) {
name = null;
}
if (name != null) {
FqName fqName = StandardNames.FqNames.parameterName;
Name name2 = StandardNames.NAME;
String asString = name.asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
Map mapOf = MapsKt.mapOf(TuplesKt.to(name2, new StringValue(asString)));
kotlinBuiltIns = builtIns;
kotlinType2 = TypeUtilsKt.replaceAnnotations(kotlinType2, Annotations.Companion.create(CollectionsKt.plus(kotlinType2.getAnnotations(), new BuiltInAnnotationDescriptor(kotlinBuiltIns, fqName, mapOf, false, 8, null))));
} else {
kotlinBuiltIns = builtIns;
}
arrayList.add(TypeUtilsKt.asTypeProjection(kotlinType2));
i = i4;
builtIns = kotlinBuiltIns;
}
arrayList.add(TypeUtilsKt.asTypeProjection(returnType));
return arrayList;
}
public static final FunctionTypeKind getFunctionTypeKind(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
if (mo1394getDeclarationDescriptor != null) {
return getFunctionTypeKind(mo1394getDeclarationDescriptor);
}
return null;
}
public static final KotlinType getReceiverTypeFromFunctionType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
isBuiltinFunctionalType(kotlinType);
if (!isTypeAnnotatedWithExtensionFunctionType(kotlinType)) {
return null;
}
return kotlinType.getArguments().get(contextFunctionTypeParamsCount(kotlinType)).getType();
}
public static final KotlinType getReturnTypeFromFunctionType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
isBuiltinFunctionalType(kotlinType);
KotlinType type = ((TypeProjection) CollectionsKt.last((List) kotlinType.getArguments())).getType();
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
return type;
}
public static final List<TypeProjection> getValueParameterTypesFromFunctionType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
isBuiltinFunctionalType(kotlinType);
return kotlinType.getArguments().subList((isBuiltinExtensionFunctionalType(kotlinType) ? 1 : 0) + contextFunctionTypeParamsCount(kotlinType), r0.size() - 1);
}
public static final boolean isBuiltinExtensionFunctionalType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
return isBuiltinFunctionalType(kotlinType) && isTypeAnnotatedWithExtensionFunctionType(kotlinType);
}
public static final boolean isBuiltinFunctionalClassDescriptor(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
FunctionTypeKind functionTypeKind = getFunctionTypeKind(declarationDescriptor);
return Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.Function.INSTANCE) || Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.SuspendFunction.INSTANCE);
}
public static final boolean isBuiltinFunctionalType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
return mo1394getDeclarationDescriptor != null && isBuiltinFunctionalClassDescriptor(mo1394getDeclarationDescriptor);
}
public static final boolean isFunctionType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
return Intrinsics.areEqual(getFunctionTypeKind(kotlinType), FunctionTypeKind.Function.INSTANCE);
}
public static final boolean isSuspendFunctionType(KotlinType kotlinType) {
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
return Intrinsics.areEqual(getFunctionTypeKind(kotlinType), FunctionTypeKind.SuspendFunction.INSTANCE);
}
private static final boolean isTypeAnnotatedWithExtensionFunctionType(KotlinType kotlinType) {
return kotlinType.getAnnotations().mo1389findAnnotation(StandardNames.FqNames.extensionFunctionType) != null;
}
public static final Annotations withContextReceiversFunctionAnnotation(Annotations annotations, KotlinBuiltIns builtIns, int i) {
Intrinsics.checkNotNullParameter(annotations, "<this>");
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
FqName fqName = StandardNames.FqNames.contextFunctionTypeParams;
return annotations.hasAnnotation(fqName) ? annotations : Annotations.Companion.create(CollectionsKt.plus(annotations, new BuiltInAnnotationDescriptor(builtIns, fqName, MapsKt.mapOf(TuplesKt.to(StandardNames.CONTEXT_FUNCTION_TYPE_PARAMETER_COUNT_NAME, new IntValue(i))), false, 8, null)));
}
public static final Annotations withExtensionFunctionAnnotation(Annotations annotations, KotlinBuiltIns builtIns) {
Intrinsics.checkNotNullParameter(annotations, "<this>");
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
FqName fqName = StandardNames.FqNames.extensionFunctionType;
return annotations.hasAnnotation(fqName) ? annotations : Annotations.Companion.create(CollectionsKt.plus(annotations, new BuiltInAnnotationDescriptor(builtIns, fqName, MapsKt.emptyMap(), false, 8, null)));
}
public static final FunctionTypeKind getFunctionTypeKind(DeclarationDescriptor declarationDescriptor) {
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
if ((declarationDescriptor instanceof ClassDescriptor) && KotlinBuiltIns.isUnderKotlinPackage(declarationDescriptor)) {
return getFunctionTypeKind(DescriptorUtilsKt.getFqNameUnsafe(declarationDescriptor));
}
return null;
}
private static final FunctionTypeKind getFunctionTypeKind(FqNameUnsafe fqNameUnsafe) {
if (!fqNameUnsafe.isSafe() || fqNameUnsafe.isRoot()) {
return null;
}
FunctionTypeKindExtractor functionTypeKindExtractor = FunctionTypeKindExtractor.Companion.getDefault();
FqName parent = fqNameUnsafe.toSafe().parent();
Intrinsics.checkNotNullExpressionValue(parent, "parent(...)");
String asString = fqNameUnsafe.shortName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
return functionTypeKindExtractor.getFunctionalClassKind(parent, asString);
}
}

View File

@@ -0,0 +1,133 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.Set;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.collections.SetsKt;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.JvmField;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* 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 PrimitiveType {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ PrimitiveType[] $VALUES;
public static final PrimitiveType BOOLEAN = new PrimitiveType("BOOLEAN", 0, "Boolean");
public static final PrimitiveType BYTE;
public static final PrimitiveType CHAR;
public static final Companion Companion;
public static final PrimitiveType DOUBLE;
public static final PrimitiveType FLOAT;
public static final PrimitiveType INT;
public static final PrimitiveType LONG;
@JvmField
public static final Set<PrimitiveType> NUMBER_TYPES;
public static final PrimitiveType SHORT;
private final Lazy arrayTypeFqName$delegate;
private final Name arrayTypeName;
private final Lazy typeFqName$delegate;
private final Name typeName;
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
private static final /* synthetic */ PrimitiveType[] $values() {
return new PrimitiveType[]{BOOLEAN, CHAR, BYTE, SHORT, INT, FLOAT, LONG, DOUBLE};
}
static {
PrimitiveType primitiveType = new PrimitiveType("CHAR", 1, "Char");
CHAR = primitiveType;
PrimitiveType primitiveType2 = new PrimitiveType("BYTE", 2, "Byte");
BYTE = primitiveType2;
PrimitiveType primitiveType3 = new PrimitiveType("SHORT", 3, "Short");
SHORT = primitiveType3;
PrimitiveType primitiveType4 = new PrimitiveType("INT", 4, "Int");
INT = primitiveType4;
PrimitiveType primitiveType5 = new PrimitiveType("FLOAT", 5, "Float");
FLOAT = primitiveType5;
PrimitiveType primitiveType6 = new PrimitiveType("LONG", 6, "Long");
LONG = primitiveType6;
PrimitiveType primitiveType7 = new PrimitiveType("DOUBLE", 7, "Double");
DOUBLE = primitiveType7;
PrimitiveType[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
Companion = new Companion(null);
NUMBER_TYPES = SetsKt.setOf((Object[]) new PrimitiveType[]{primitiveType, primitiveType2, primitiveType3, primitiveType4, primitiveType5, primitiveType6, primitiveType7});
}
private PrimitiveType(String str, int i, String str2) {
Name identifier = Name.identifier(str2);
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
this.typeName = identifier;
Name identifier2 = Name.identifier(str2 + "Array");
Intrinsics.checkNotNullExpressionValue(identifier2, "identifier(...)");
this.arrayTypeName = identifier2;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.PUBLICATION;
this.typeFqName$delegate = LazyKt.lazy(lazyThreadSafetyMode, (Function0) new Function0<FqName>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType$typeFqName$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final FqName invoke() {
FqName child = StandardNames.BUILT_INS_PACKAGE_FQ_NAME.child(PrimitiveType.this.getTypeName());
Intrinsics.checkNotNullExpressionValue(child, "child(...)");
return child;
}
});
this.arrayTypeFqName$delegate = LazyKt.lazy(lazyThreadSafetyMode, (Function0) new Function0<FqName>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType$arrayTypeFqName$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final FqName invoke() {
FqName child = StandardNames.BUILT_INS_PACKAGE_FQ_NAME.child(PrimitiveType.this.getArrayTypeName());
Intrinsics.checkNotNullExpressionValue(child, "child(...)");
return child;
}
});
}
public static PrimitiveType valueOf(String str) {
return (PrimitiveType) Enum.valueOf(PrimitiveType.class, str);
}
public static PrimitiveType[] values() {
return (PrimitiveType[]) $VALUES.clone();
}
public final FqName getArrayTypeFqName() {
return (FqName) this.arrayTypeFqName$delegate.getValue();
}
public final Name getArrayTypeName() {
return this.arrayTypeName;
}
public final FqName getTypeFqName() {
return (FqName) this.typeFqName$delegate.getValue();
}
public final Name getTypeName() {
return this.typeName;
}
}

View File

@@ -0,0 +1,128 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.collections.CollectionsKt;
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.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.KotlinTypeFactory;
import kotlin.reflect.jvm.internal.impl.types.StarProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize.CapitalizeDecapitalizeKt;
@SourceDebugExtension({"SMAP\nReflectionTypes.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ReflectionTypes.kt\norg/jetbrains/kotlin/builtins/ReflectionTypes\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,225:1\n1549#2:226\n1620#2,3:227\n*S KotlinDebug\n*F\n+ 1 ReflectionTypes.kt\norg/jetbrains/kotlin/builtins/ReflectionTypes\n*L\n94#1:226\n94#1:227,3\n*E\n"})
/* loaded from: classes3.dex */
public final class ReflectionTypes {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kClass", "getKClass()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kProperty", "getKProperty()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kProperty0", "getKProperty0()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kProperty1", "getKProperty1()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kProperty2", "getKProperty2()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kMutableProperty0", "getKMutableProperty0()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kMutableProperty1", "getKMutableProperty1()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ReflectionTypes.class), "kMutableProperty2", "getKMutableProperty2()Lorg/jetbrains/kotlin/descriptors/ClassDescriptor;"))};
public static final Companion Companion = new Companion(null);
private final ClassLookup kClass$delegate;
private final ClassLookup kMutableProperty0$delegate;
private final ClassLookup kMutableProperty1$delegate;
private final ClassLookup kMutableProperty2$delegate;
private final ClassLookup kProperty$delegate;
private final ClassLookup kProperty0$delegate;
private final ClassLookup kProperty1$delegate;
private final ClassLookup kProperty2$delegate;
private final Lazy kotlinReflectScope$delegate;
private final NotFoundClasses notFoundClasses;
/* loaded from: classes3.dex */
public static final class ClassLookup {
private final int numberOfTypeParameters;
public ClassLookup(int i) {
this.numberOfTypeParameters = i;
}
public final ClassDescriptor getValue(ReflectionTypes types, KProperty<?> property) {
Intrinsics.checkNotNullParameter(types, "types");
Intrinsics.checkNotNullParameter(property, "property");
return types.find(CapitalizeDecapitalizeKt.capitalizeAsciiOnly(property.getName()), this.numberOfTypeParameters);
}
}
@SourceDebugExtension({"SMAP\nReflectionTypes.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ReflectionTypes.kt\norg/jetbrains/kotlin/builtins/ReflectionTypes$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,225:1\n1747#2,3:226\n*S KotlinDebug\n*F\n+ 1 ReflectionTypes.kt\norg/jetbrains/kotlin/builtins/ReflectionTypes$Companion\n*L\n122#1:226,3\n*E\n"})
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final KotlinType createKPropertyStarType(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(module, StandardNames.FqNames.kProperty);
if (findClassAcrossModuleDependencies == null) {
return null;
}
TypeAttributes empty = TypeAttributes.Companion.getEmpty();
List<TypeParameterDescriptor> parameters = findClassAcrossModuleDependencies.getTypeConstructor().getParameters();
Intrinsics.checkNotNullExpressionValue(parameters, "getParameters(...)");
Object single = CollectionsKt.single((List<? extends Object>) parameters);
Intrinsics.checkNotNullExpressionValue(single, "single(...)");
return KotlinTypeFactory.simpleNotNullType(empty, findClassAcrossModuleDependencies, CollectionsKt.listOf(new StarProjectionImpl((TypeParameterDescriptor) single)));
}
private Companion() {
}
}
public ReflectionTypes(final ModuleDescriptor module, NotFoundClasses notFoundClasses) {
Intrinsics.checkNotNullParameter(module, "module");
Intrinsics.checkNotNullParameter(notFoundClasses, "notFoundClasses");
this.notFoundClasses = notFoundClasses;
this.kotlinReflectScope$delegate = LazyKt.lazy(LazyThreadSafetyMode.PUBLICATION, (Function0) new Function0<MemberScope>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.ReflectionTypes$kotlinReflectScope$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final MemberScope invoke() {
return ModuleDescriptor.this.getPackage(StandardNames.KOTLIN_REFLECT_FQ_NAME).getMemberScope();
}
});
this.kClass$delegate = new ClassLookup(1);
this.kProperty$delegate = new ClassLookup(1);
this.kProperty0$delegate = new ClassLookup(1);
this.kProperty1$delegate = new ClassLookup(2);
this.kProperty2$delegate = new ClassLookup(3);
this.kMutableProperty0$delegate = new ClassLookup(1);
this.kMutableProperty1$delegate = new ClassLookup(2);
this.kMutableProperty2$delegate = new ClassLookup(3);
}
/* JADX INFO: Access modifiers changed from: private */
public final ClassDescriptor find(String str, int i) {
Name identifier = Name.identifier(str);
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
ClassifierDescriptor mo1396getContributedClassifier = getKotlinReflectScope().mo1396getContributedClassifier(identifier, NoLookupLocation.FROM_REFLECTION);
ClassDescriptor classDescriptor = mo1396getContributedClassifier instanceof ClassDescriptor ? (ClassDescriptor) mo1396getContributedClassifier : null;
return classDescriptor == null ? this.notFoundClasses.getClass(new ClassId(StandardNames.KOTLIN_REFLECT_FQ_NAME, identifier), CollectionsKt.listOf(Integer.valueOf(i))) : classDescriptor;
}
private final MemberScope getKotlinReflectScope() {
return (MemberScope) this.kotlinReflectScope$delegate.getValue();
}
public final ClassDescriptor getKClass() {
return this.kClass$delegate.getValue(this, $$delegatedProperties[0]);
}
}

View File

@@ -0,0 +1,676 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.android.gms.measurement.internal.a;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.collections.SetsKt;
import kotlin.jvm.JvmField;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
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;
import kotlin.reflect.jvm.internal.impl.utils.CollectionsKt;
/* loaded from: classes3.dex */
public final class StandardNames {
@JvmField
public static final FqName ANNOTATION_PACKAGE_FQ_NAME;
@JvmField
public static final Name BACKING_FIELD;
@JvmField
public static final FqName BUILT_INS_PACKAGE_FQ_NAME;
@JvmField
public static final Set<FqName> BUILT_INS_PACKAGE_FQ_NAMES;
@JvmField
public static final Name BUILT_INS_PACKAGE_NAME;
@JvmField
public static final Name CHAR_CODE;
@JvmField
public static final FqName COLLECTIONS_PACKAGE_FQ_NAME;
@JvmField
public static final Name CONTEXT_FUNCTION_TYPE_PARAMETER_COUNT_NAME;
@JvmField
public static final FqName CONTINUATION_INTERFACE_FQ_NAME;
@JvmField
public static final FqName COROUTINES_INTRINSICS_PACKAGE_FQ_NAME;
@JvmField
public static final FqName COROUTINES_JVM_INTERNAL_PACKAGE_FQ_NAME;
@JvmField
public static final FqName COROUTINES_PACKAGE_FQ_NAME;
@JvmField
public static final String DATA_CLASS_COMPONENT_PREFIX;
@JvmField
public static final Name DATA_CLASS_COPY;
@JvmField
public static final Name DEFAULT_VALUE_PARAMETER;
@JvmField
public static final FqName DYNAMIC_FQ_NAME;
@JvmField
public static final Name ENUM_ENTRIES;
@JvmField
public static final Name ENUM_VALUES;
@JvmField
public static final Name ENUM_VALUE_OF;
@JvmField
public static final Name HASHCODE_NAME;
@JvmField
public static final Name IMPLICIT_LAMBDA_PARAMETER_NAME;
public static final StandardNames INSTANCE = new StandardNames();
@JvmField
public static final FqName KOTLIN_INTERNAL_FQ_NAME;
@JvmField
public static final FqName KOTLIN_REFLECT_FQ_NAME;
@JvmField
public static final Name MAIN;
@JvmField
public static final Name NAME;
@JvmField
public static final Name NEXT_CHAR;
private static final FqName NON_EXISTENT_CLASS;
@JvmField
public static final List<String> PREFIXES;
@JvmField
public static final FqName RANGES_PACKAGE_FQ_NAME;
@JvmField
public static final FqName RESULT_FQ_NAME;
@JvmField
public static final FqName TEXT_PACKAGE_FQ_NAME;
@SourceDebugExtension({"SMAP\nStandardNames.kt\nKotlin\n*S Kotlin\n*F\n+ 1 StandardNames.kt\norg/jetbrains/kotlin/builtins/StandardNames$FqNames\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,302:1\n11400#2,3:303\n11400#2,3:306\n*S KotlinDebug\n*F\n+ 1 StandardNames.kt\norg/jetbrains/kotlin/builtins/StandardNames$FqNames\n*L\n198#1:303,3\n202#1:306,3\n*E\n"})
/* loaded from: classes3.dex */
public static final class FqNames {
public static final FqNames INSTANCE;
@JvmField
public static final FqNameUnsafe _boolean;
@JvmField
public static final FqNameUnsafe _byte;
@JvmField
public static final FqNameUnsafe _char;
@JvmField
public static final FqNameUnsafe _double;
@JvmField
public static final FqNameUnsafe _enum;
@JvmField
public static final FqNameUnsafe _float;
@JvmField
public static final FqNameUnsafe _int;
@JvmField
public static final FqNameUnsafe _long;
@JvmField
public static final FqNameUnsafe _short;
@JvmField
public static final FqName accessibleLateinitPropertyLiteral;
@JvmField
public static final FqName annotation;
@JvmField
public static final FqName annotationRetention;
@JvmField
public static final FqName annotationTarget;
@JvmField
public static final FqNameUnsafe any;
@JvmField
public static final FqNameUnsafe array;
@JvmField
public static final Map<FqNameUnsafe, PrimitiveType> arrayClassFqNameToPrimitiveType;
@JvmField
public static final FqNameUnsafe charSequence;
@JvmField
public static final FqNameUnsafe cloneable;
@JvmField
public static final FqName collection;
@JvmField
public static final FqName comparable;
@JvmField
public static final FqName contextFunctionTypeParams;
@JvmField
public static final FqName deprecated;
@JvmField
public static final FqName deprecatedSinceKotlin;
@JvmField
public static final FqName deprecationLevel;
@JvmField
public static final FqName extensionFunctionType;
@JvmField
public static final Map<FqNameUnsafe, PrimitiveType> fqNameToPrimitiveType;
@JvmField
public static final FqNameUnsafe functionSupertype;
@JvmField
public static final FqNameUnsafe intRange;
@JvmField
public static final FqName iterable;
@JvmField
public static final FqName iterator;
@JvmField
public static final FqNameUnsafe kCallable;
@JvmField
public static final FqNameUnsafe kClass;
@JvmField
public static final FqNameUnsafe kDeclarationContainer;
@JvmField
public static final FqNameUnsafe kMutableProperty0;
@JvmField
public static final FqNameUnsafe kMutableProperty1;
@JvmField
public static final FqNameUnsafe kMutableProperty2;
@JvmField
public static final FqNameUnsafe kMutablePropertyFqName;
@JvmField
public static final ClassId kProperty;
@JvmField
public static final FqNameUnsafe kProperty0;
@JvmField
public static final FqNameUnsafe kProperty1;
@JvmField
public static final FqNameUnsafe kProperty2;
@JvmField
public static final FqNameUnsafe kPropertyFqName;
@JvmField
public static final FqNameUnsafe kType;
@JvmField
public static final FqName list;
@JvmField
public static final FqName listIterator;
@JvmField
public static final FqNameUnsafe longRange;
@JvmField
public static final FqName map;
@JvmField
public static final FqName mapEntry;
@JvmField
public static final FqName mustBeDocumented;
@JvmField
public static final FqName mutableCollection;
@JvmField
public static final FqName mutableIterable;
@JvmField
public static final FqName mutableIterator;
@JvmField
public static final FqName mutableList;
@JvmField
public static final FqName mutableListIterator;
@JvmField
public static final FqName mutableMap;
@JvmField
public static final FqName mutableMapEntry;
@JvmField
public static final FqName mutableSet;
@JvmField
public static final FqNameUnsafe nothing;
@JvmField
public static final FqNameUnsafe number;
@JvmField
public static final FqName parameterName;
@JvmField
public static final ClassId parameterNameClassId;
@JvmField
public static final Set<Name> primitiveArrayTypeShortNames;
@JvmField
public static final Set<Name> primitiveTypeShortNames;
@JvmField
public static final FqName publishedApi;
@JvmField
public static final FqName repeatable;
@JvmField
public static final ClassId repeatableClassId;
@JvmField
public static final FqName replaceWith;
@JvmField
public static final FqName retention;
@JvmField
public static final ClassId retentionClassId;
@JvmField
public static final FqName set;
@JvmField
public static final FqNameUnsafe string;
@JvmField
public static final FqName suppress;
@JvmField
public static final FqName target;
@JvmField
public static final ClassId targetClassId;
@JvmField
public static final FqName throwable;
@JvmField
public static final ClassId uByte;
@JvmField
public static final FqName uByteArrayFqName;
@JvmField
public static final FqName uByteFqName;
@JvmField
public static final ClassId uInt;
@JvmField
public static final FqName uIntArrayFqName;
@JvmField
public static final FqName uIntFqName;
@JvmField
public static final ClassId uLong;
@JvmField
public static final FqName uLongArrayFqName;
@JvmField
public static final FqName uLongFqName;
@JvmField
public static final ClassId uShort;
@JvmField
public static final FqName uShortArrayFqName;
@JvmField
public static final FqName uShortFqName;
@JvmField
public static final FqNameUnsafe unit;
@JvmField
public static final FqName unsafeVariance;
static {
FqNames fqNames = new FqNames();
INSTANCE = fqNames;
any = fqNames.fqNameUnsafe("Any");
nothing = fqNames.fqNameUnsafe("Nothing");
cloneable = fqNames.fqNameUnsafe("Cloneable");
suppress = fqNames.fqName("Suppress");
unit = fqNames.fqNameUnsafe("Unit");
charSequence = fqNames.fqNameUnsafe("CharSequence");
string = fqNames.fqNameUnsafe("String");
array = fqNames.fqNameUnsafe("Array");
_boolean = fqNames.fqNameUnsafe("Boolean");
_char = fqNames.fqNameUnsafe("Char");
_byte = fqNames.fqNameUnsafe("Byte");
_short = fqNames.fqNameUnsafe("Short");
_int = fqNames.fqNameUnsafe("Int");
_long = fqNames.fqNameUnsafe("Long");
_float = fqNames.fqNameUnsafe("Float");
_double = fqNames.fqNameUnsafe("Double");
number = fqNames.fqNameUnsafe("Number");
_enum = fqNames.fqNameUnsafe("Enum");
functionSupertype = fqNames.fqNameUnsafe("Function");
throwable = fqNames.fqName("Throwable");
comparable = fqNames.fqName("Comparable");
intRange = fqNames.rangesFqName("IntRange");
longRange = fqNames.rangesFqName("LongRange");
deprecated = fqNames.fqName("Deprecated");
deprecatedSinceKotlin = fqNames.fqName("DeprecatedSinceKotlin");
deprecationLevel = fqNames.fqName("DeprecationLevel");
replaceWith = fqNames.fqName("ReplaceWith");
extensionFunctionType = fqNames.fqName("ExtensionFunctionType");
contextFunctionTypeParams = fqNames.fqName("ContextFunctionTypeParams");
FqName fqName = fqNames.fqName("ParameterName");
parameterName = fqName;
ClassId classId = ClassId.topLevel(fqName);
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
parameterNameClassId = classId;
annotation = fqNames.fqName("Annotation");
FqName annotationName = fqNames.annotationName("Target");
target = annotationName;
ClassId classId2 = ClassId.topLevel(annotationName);
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
targetClassId = classId2;
annotationTarget = fqNames.annotationName("AnnotationTarget");
annotationRetention = fqNames.annotationName("AnnotationRetention");
FqName annotationName2 = fqNames.annotationName("Retention");
retention = annotationName2;
ClassId classId3 = ClassId.topLevel(annotationName2);
Intrinsics.checkNotNullExpressionValue(classId3, "topLevel(...)");
retentionClassId = classId3;
FqName annotationName3 = fqNames.annotationName("Repeatable");
repeatable = annotationName3;
ClassId classId4 = ClassId.topLevel(annotationName3);
Intrinsics.checkNotNullExpressionValue(classId4, "topLevel(...)");
repeatableClassId = classId4;
mustBeDocumented = fqNames.annotationName("MustBeDocumented");
unsafeVariance = fqNames.fqName("UnsafeVariance");
publishedApi = fqNames.fqName("PublishedApi");
accessibleLateinitPropertyLiteral = fqNames.internalName("AccessibleLateinitPropertyLiteral");
iterator = fqNames.collectionsFqName("Iterator");
iterable = fqNames.collectionsFqName("Iterable");
collection = fqNames.collectionsFqName("Collection");
list = fqNames.collectionsFqName("List");
listIterator = fqNames.collectionsFqName("ListIterator");
set = fqNames.collectionsFqName("Set");
FqName collectionsFqName = fqNames.collectionsFqName("Map");
map = collectionsFqName;
mapEntry = a.x("Entry", collectionsFqName, "child(...)");
mutableIterator = fqNames.collectionsFqName("MutableIterator");
mutableIterable = fqNames.collectionsFqName("MutableIterable");
mutableCollection = fqNames.collectionsFqName("MutableCollection");
mutableList = fqNames.collectionsFqName("MutableList");
mutableListIterator = fqNames.collectionsFqName("MutableListIterator");
mutableSet = fqNames.collectionsFqName("MutableSet");
FqName collectionsFqName2 = fqNames.collectionsFqName("MutableMap");
mutableMap = collectionsFqName2;
mutableMapEntry = a.x("MutableEntry", collectionsFqName2, "child(...)");
kClass = reflect("KClass");
kType = reflect("KType");
kCallable = reflect("KCallable");
kProperty0 = reflect("KProperty0");
kProperty1 = reflect("KProperty1");
kProperty2 = reflect("KProperty2");
kMutableProperty0 = reflect("KMutableProperty0");
kMutableProperty1 = reflect("KMutableProperty1");
kMutableProperty2 = reflect("KMutableProperty2");
FqNameUnsafe reflect = reflect("KProperty");
kPropertyFqName = reflect;
kMutablePropertyFqName = reflect("KMutableProperty");
ClassId classId5 = ClassId.topLevel(reflect.toSafe());
Intrinsics.checkNotNullExpressionValue(classId5, "topLevel(...)");
kProperty = classId5;
kDeclarationContainer = reflect("KDeclarationContainer");
FqName fqName2 = fqNames.fqName("UByte");
uByteFqName = fqName2;
FqName fqName3 = fqNames.fqName("UShort");
uShortFqName = fqName3;
FqName fqName4 = fqNames.fqName("UInt");
uIntFqName = fqName4;
FqName fqName5 = fqNames.fqName("ULong");
uLongFqName = fqName5;
ClassId classId6 = ClassId.topLevel(fqName2);
Intrinsics.checkNotNullExpressionValue(classId6, "topLevel(...)");
uByte = classId6;
ClassId classId7 = ClassId.topLevel(fqName3);
Intrinsics.checkNotNullExpressionValue(classId7, "topLevel(...)");
uShort = classId7;
ClassId classId8 = ClassId.topLevel(fqName4);
Intrinsics.checkNotNullExpressionValue(classId8, "topLevel(...)");
uInt = classId8;
ClassId classId9 = ClassId.topLevel(fqName5);
Intrinsics.checkNotNullExpressionValue(classId9, "topLevel(...)");
uLong = classId9;
uByteArrayFqName = fqNames.fqName("UByteArray");
uShortArrayFqName = fqNames.fqName("UShortArray");
uIntArrayFqName = fqNames.fqName("UIntArray");
uLongArrayFqName = fqNames.fqName("ULongArray");
HashSet newHashSetWithExpectedSize = CollectionsKt.newHashSetWithExpectedSize(PrimitiveType.values().length);
for (PrimitiveType primitiveType : PrimitiveType.values()) {
newHashSetWithExpectedSize.add(primitiveType.getTypeName());
}
primitiveTypeShortNames = newHashSetWithExpectedSize;
HashSet newHashSetWithExpectedSize2 = CollectionsKt.newHashSetWithExpectedSize(PrimitiveType.values().length);
for (PrimitiveType primitiveType2 : PrimitiveType.values()) {
newHashSetWithExpectedSize2.add(primitiveType2.getArrayTypeName());
}
primitiveArrayTypeShortNames = newHashSetWithExpectedSize2;
HashMap newHashMapWithExpectedSize = CollectionsKt.newHashMapWithExpectedSize(PrimitiveType.values().length);
for (PrimitiveType primitiveType3 : PrimitiveType.values()) {
FqNames fqNames2 = INSTANCE;
String asString = primitiveType3.getTypeName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
newHashMapWithExpectedSize.put(fqNames2.fqNameUnsafe(asString), primitiveType3);
}
fqNameToPrimitiveType = newHashMapWithExpectedSize;
HashMap newHashMapWithExpectedSize2 = CollectionsKt.newHashMapWithExpectedSize(PrimitiveType.values().length);
for (PrimitiveType primitiveType4 : PrimitiveType.values()) {
FqNames fqNames3 = INSTANCE;
String asString2 = primitiveType4.getArrayTypeName().asString();
Intrinsics.checkNotNullExpressionValue(asString2, "asString(...)");
newHashMapWithExpectedSize2.put(fqNames3.fqNameUnsafe(asString2), primitiveType4);
}
arrayClassFqNameToPrimitiveType = newHashMapWithExpectedSize2;
}
private FqNames() {
}
private final FqName annotationName(String str) {
return a.x(str, StandardNames.ANNOTATION_PACKAGE_FQ_NAME, "child(...)");
}
private final FqName collectionsFqName(String str) {
return a.x(str, StandardNames.COLLECTIONS_PACKAGE_FQ_NAME, "child(...)");
}
private final FqName fqName(String str) {
return a.x(str, StandardNames.BUILT_INS_PACKAGE_FQ_NAME, "child(...)");
}
private final FqNameUnsafe fqNameUnsafe(String str) {
FqNameUnsafe unsafe = fqName(str).toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
return unsafe;
}
private final FqName internalName(String str) {
return a.x(str, StandardNames.KOTLIN_INTERNAL_FQ_NAME, "child(...)");
}
private final FqNameUnsafe rangesFqName(String str) {
FqNameUnsafe unsafe = StandardNames.RANGES_PACKAGE_FQ_NAME.child(Name.identifier(str)).toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
return unsafe;
}
@JvmStatic
public static final FqNameUnsafe reflect(String simpleName) {
Intrinsics.checkNotNullParameter(simpleName, "simpleName");
FqNameUnsafe unsafe = StandardNames.KOTLIN_REFLECT_FQ_NAME.child(Name.identifier(simpleName)).toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
return unsafe;
}
}
static {
Name identifier = Name.identifier("field");
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
BACKING_FIELD = identifier;
Name identifier2 = Name.identifier("value");
Intrinsics.checkNotNullExpressionValue(identifier2, "identifier(...)");
DEFAULT_VALUE_PARAMETER = identifier2;
Name identifier3 = Name.identifier("values");
Intrinsics.checkNotNullExpressionValue(identifier3, "identifier(...)");
ENUM_VALUES = identifier3;
Name identifier4 = Name.identifier(RemoteConfigConstants.ResponseFieldKey.ENTRIES);
Intrinsics.checkNotNullExpressionValue(identifier4, "identifier(...)");
ENUM_ENTRIES = identifier4;
Name identifier5 = Name.identifier("valueOf");
Intrinsics.checkNotNullExpressionValue(identifier5, "identifier(...)");
ENUM_VALUE_OF = identifier5;
Name identifier6 = Name.identifier("copy");
Intrinsics.checkNotNullExpressionValue(identifier6, "identifier(...)");
DATA_CLASS_COPY = identifier6;
DATA_CLASS_COMPONENT_PREFIX = "component";
Name identifier7 = Name.identifier("hashCode");
Intrinsics.checkNotNullExpressionValue(identifier7, "identifier(...)");
HASHCODE_NAME = identifier7;
Name identifier8 = Name.identifier("code");
Intrinsics.checkNotNullExpressionValue(identifier8, "identifier(...)");
CHAR_CODE = identifier8;
Name identifier9 = Name.identifier(AppMeasurementSdk.ConditionalUserProperty.NAME);
Intrinsics.checkNotNullExpressionValue(identifier9, "identifier(...)");
NAME = identifier9;
Name identifier10 = Name.identifier("main");
Intrinsics.checkNotNullExpressionValue(identifier10, "identifier(...)");
MAIN = identifier10;
Name identifier11 = Name.identifier("nextChar");
Intrinsics.checkNotNullExpressionValue(identifier11, "identifier(...)");
NEXT_CHAR = identifier11;
Name identifier12 = Name.identifier("it");
Intrinsics.checkNotNullExpressionValue(identifier12, "identifier(...)");
IMPLICIT_LAMBDA_PARAMETER_NAME = identifier12;
Name identifier13 = Name.identifier("count");
Intrinsics.checkNotNullExpressionValue(identifier13, "identifier(...)");
CONTEXT_FUNCTION_TYPE_PARAMETER_COUNT_NAME = identifier13;
DYNAMIC_FQ_NAME = new FqName("<dynamic>");
FqName fqName = new FqName("kotlin.coroutines");
COROUTINES_PACKAGE_FQ_NAME = fqName;
COROUTINES_JVM_INTERNAL_PACKAGE_FQ_NAME = new FqName("kotlin.coroutines.jvm.internal");
COROUTINES_INTRINSICS_PACKAGE_FQ_NAME = new FqName("kotlin.coroutines.intrinsics");
CONTINUATION_INTERFACE_FQ_NAME = a.x("Continuation", fqName, "child(...)");
RESULT_FQ_NAME = new FqName("kotlin.Result");
FqName fqName2 = new FqName("kotlin.reflect");
KOTLIN_REFLECT_FQ_NAME = fqName2;
PREFIXES = kotlin.collections.CollectionsKt.listOf((Object[]) new String[]{"KProperty", "KMutableProperty", "KFunction", "KSuspendFunction"});
Name identifier14 = Name.identifier("kotlin");
Intrinsics.checkNotNullExpressionValue(identifier14, "identifier(...)");
BUILT_INS_PACKAGE_NAME = identifier14;
FqName fqName3 = FqName.topLevel(identifier14);
Intrinsics.checkNotNullExpressionValue(fqName3, "topLevel(...)");
BUILT_INS_PACKAGE_FQ_NAME = fqName3;
FqName x3 = a.x("annotation", fqName3, "child(...)");
ANNOTATION_PACKAGE_FQ_NAME = x3;
FqName x4 = a.x("collections", fqName3, "child(...)");
COLLECTIONS_PACKAGE_FQ_NAME = x4;
FqName x5 = a.x("ranges", fqName3, "child(...)");
RANGES_PACKAGE_FQ_NAME = x5;
TEXT_PACKAGE_FQ_NAME = a.x("text", fqName3, "child(...)");
FqName x6 = a.x("internal", fqName3, "child(...)");
KOTLIN_INTERNAL_FQ_NAME = x6;
NON_EXISTENT_CLASS = new FqName("error.NonExistentClass");
BUILT_INS_PACKAGE_FQ_NAMES = SetsKt.setOf((Object[]) new FqName[]{fqName3, x4, x5, x3, fqName2, x6, fqName});
}
private StandardNames() {
}
@JvmStatic
public static final ClassId getFunctionClassId(int i) {
return new ClassId(BUILT_INS_PACKAGE_FQ_NAME, Name.identifier(getFunctionName(i)));
}
@JvmStatic
public static final String getFunctionName(int i) {
return a.l(i, "Function");
}
@JvmStatic
public static final FqName getPrimitiveFqName(PrimitiveType primitiveType) {
Intrinsics.checkNotNullParameter(primitiveType, "primitiveType");
FqName child = BUILT_INS_PACKAGE_FQ_NAME.child(primitiveType.getTypeName());
Intrinsics.checkNotNullExpressionValue(child, "child(...)");
return child;
}
@JvmStatic
public static final String getSuspendFunctionName(int i) {
return FunctionTypeKind.SuspendFunction.INSTANCE.getClassNamePrefix() + i;
}
@JvmStatic
public static final boolean isPrimitiveArray(FqNameUnsafe arrayFqName) {
Intrinsics.checkNotNullParameter(arrayFqName, "arrayFqName");
return FqNames.arrayClassFqNameToPrimitiveType.get(arrayFqName) != null;
}
}

View File

@@ -0,0 +1,77 @@
package kotlin.reflect.jvm.internal.impl.builtins;
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.ClassKind;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
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.EmptyPackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.MutableClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.TypeParameterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
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.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
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.ErrorUtils;
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
@SourceDebugExtension({"SMAP\nsuspendFunctionTypes.kt\nKotlin\n*S Kotlin\n*F\n+ 1 suspendFunctionTypes.kt\norg/jetbrains/kotlin/builtins/SuspendFunctionTypesKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,65:1\n1549#2:66\n1620#2,3:67\n1#3:70\n*S KotlinDebug\n*F\n+ 1 suspendFunctionTypes.kt\norg/jetbrains/kotlin/builtins/SuspendFunctionTypesKt\n*L\n54#1:66\n54#1:67,3\n*E\n"})
/* loaded from: classes3.dex */
public final class SuspendFunctionTypesKt {
private static final MutableClassDescriptor FAKE_CONTINUATION_CLASS_DESCRIPTOR;
static {
EmptyPackageFragmentDescriptor emptyPackageFragmentDescriptor = new EmptyPackageFragmentDescriptor(ErrorUtils.INSTANCE.getErrorModule(), StandardNames.COROUTINES_PACKAGE_FQ_NAME);
ClassKind classKind = ClassKind.INTERFACE;
Name shortName = StandardNames.CONTINUATION_INTERFACE_FQ_NAME.shortName();
SourceElement sourceElement = SourceElement.NO_SOURCE;
StorageManager storageManager = LockBasedStorageManager.NO_LOCKS;
MutableClassDescriptor mutableClassDescriptor = new MutableClassDescriptor(emptyPackageFragmentDescriptor, classKind, false, false, shortName, sourceElement, storageManager);
mutableClassDescriptor.setModality(Modality.ABSTRACT);
mutableClassDescriptor.setVisibility(DescriptorVisibilities.PUBLIC);
mutableClassDescriptor.setTypeParameterDescriptors(CollectionsKt.listOf(TypeParameterDescriptorImpl.createWithDefaultBound(mutableClassDescriptor, Annotations.Companion.getEMPTY(), false, Variance.IN_VARIANCE, Name.identifier("T"), 0, storageManager)));
mutableClassDescriptor.createTypeConstructor();
FAKE_CONTINUATION_CLASS_DESCRIPTOR = mutableClassDescriptor;
}
public static final SimpleType transformSuspendFunctionToRuntimeFunctionType(KotlinType suspendFunType) {
int collectionSizeOrDefault;
SimpleType createFunctionType;
Intrinsics.checkNotNullParameter(suspendFunType, "suspendFunType");
FunctionTypesKt.isSuspendFunctionType(suspendFunType);
KotlinBuiltIns builtIns = TypeUtilsKt.getBuiltIns(suspendFunType);
Annotations annotations = suspendFunType.getAnnotations();
KotlinType receiverTypeFromFunctionType = FunctionTypesKt.getReceiverTypeFromFunctionType(suspendFunType);
List<KotlinType> contextReceiverTypesFromFunctionType = FunctionTypesKt.getContextReceiverTypesFromFunctionType(suspendFunType);
List<TypeProjection> valueParameterTypesFromFunctionType = FunctionTypesKt.getValueParameterTypesFromFunctionType(suspendFunType);
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(valueParameterTypesFromFunctionType, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = valueParameterTypesFromFunctionType.iterator();
while (it.hasNext()) {
arrayList.add(((TypeProjection) it.next()).getType());
}
TypeAttributes empty = TypeAttributes.Companion.getEmpty();
TypeConstructor typeConstructor = FAKE_CONTINUATION_CLASS_DESCRIPTOR.getTypeConstructor();
Intrinsics.checkNotNullExpressionValue(typeConstructor, "getTypeConstructor(...)");
List plus = CollectionsKt.plus((Collection<? extends SimpleType>) arrayList, KotlinTypeFactory.simpleType$default(empty, typeConstructor, CollectionsKt.listOf(TypeUtilsKt.asTypeProjection(FunctionTypesKt.getReturnTypeFromFunctionType(suspendFunType))), false, (KotlinTypeRefiner) null, 16, (Object) null));
SimpleType nullableAnyType = TypeUtilsKt.getBuiltIns(suspendFunType).getNullableAnyType();
Intrinsics.checkNotNullExpressionValue(nullableAnyType, "getNullableAnyType(...)");
createFunctionType = FunctionTypesKt.createFunctionType(builtIns, annotations, receiverTypeFromFunctionType, contextReceiverTypesFromFunctionType, plus, null, nullableAnyType, (r17 & 128) != 0 ? false : false);
return createFunctionType.makeNullableAsSpecified(suspendFunType.isMarkedNullable());
}
}

View File

@@ -0,0 +1,62 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* 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 UnsignedArrayType {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ UnsignedArrayType[] $VALUES;
public static final UnsignedArrayType UBYTEARRAY;
public static final UnsignedArrayType UINTARRAY;
public static final UnsignedArrayType ULONGARRAY;
public static final UnsignedArrayType USHORTARRAY;
private final ClassId classId;
private final Name typeName;
private static final /* synthetic */ UnsignedArrayType[] $values() {
return new UnsignedArrayType[]{UBYTEARRAY, USHORTARRAY, UINTARRAY, ULONGARRAY};
}
static {
ClassId fromString = ClassId.fromString("kotlin/UByteArray");
Intrinsics.checkNotNullExpressionValue(fromString, "fromString(...)");
UBYTEARRAY = new UnsignedArrayType("UBYTEARRAY", 0, fromString);
ClassId fromString2 = ClassId.fromString("kotlin/UShortArray");
Intrinsics.checkNotNullExpressionValue(fromString2, "fromString(...)");
USHORTARRAY = new UnsignedArrayType("USHORTARRAY", 1, fromString2);
ClassId fromString3 = ClassId.fromString("kotlin/UIntArray");
Intrinsics.checkNotNullExpressionValue(fromString3, "fromString(...)");
UINTARRAY = new UnsignedArrayType("UINTARRAY", 2, fromString3);
ClassId fromString4 = ClassId.fromString("kotlin/ULongArray");
Intrinsics.checkNotNullExpressionValue(fromString4, "fromString(...)");
ULONGARRAY = new UnsignedArrayType("ULONGARRAY", 3, fromString4);
UnsignedArrayType[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private UnsignedArrayType(String str, int i, ClassId classId) {
this.classId = classId;
Name shortClassName = classId.getShortClassName();
Intrinsics.checkNotNullExpressionValue(shortClassName, "getShortClassName(...)");
this.typeName = shortClassName;
}
public static UnsignedArrayType valueOf(String str) {
return (UnsignedArrayType) Enum.valueOf(UnsignedArrayType.class, str);
}
public static UnsignedArrayType[] values() {
return (UnsignedArrayType[]) $VALUES.clone();
}
public final Name getTypeName() {
return this.typeName;
}
}

View File

@@ -0,0 +1,72 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* 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 UnsignedType {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ UnsignedType[] $VALUES;
public static final UnsignedType UBYTE;
public static final UnsignedType UINT;
public static final UnsignedType ULONG;
public static final UnsignedType USHORT;
private final ClassId arrayClassId;
private final ClassId classId;
private final Name typeName;
private static final /* synthetic */ UnsignedType[] $values() {
return new UnsignedType[]{UBYTE, USHORT, UINT, ULONG};
}
static {
ClassId fromString = ClassId.fromString("kotlin/UByte");
Intrinsics.checkNotNullExpressionValue(fromString, "fromString(...)");
UBYTE = new UnsignedType("UBYTE", 0, fromString);
ClassId fromString2 = ClassId.fromString("kotlin/UShort");
Intrinsics.checkNotNullExpressionValue(fromString2, "fromString(...)");
USHORT = new UnsignedType("USHORT", 1, fromString2);
ClassId fromString3 = ClassId.fromString("kotlin/UInt");
Intrinsics.checkNotNullExpressionValue(fromString3, "fromString(...)");
UINT = new UnsignedType("UINT", 2, fromString3);
ClassId fromString4 = ClassId.fromString("kotlin/ULong");
Intrinsics.checkNotNullExpressionValue(fromString4, "fromString(...)");
ULONG = new UnsignedType("ULONG", 3, fromString4);
UnsignedType[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private UnsignedType(String str, int i, ClassId classId) {
this.classId = classId;
Name shortClassName = classId.getShortClassName();
Intrinsics.checkNotNullExpressionValue(shortClassName, "getShortClassName(...)");
this.typeName = shortClassName;
this.arrayClassId = new ClassId(classId.getPackageFqName(), Name.identifier(shortClassName.asString() + "Array"));
}
public static UnsignedType valueOf(String str) {
return (UnsignedType) Enum.valueOf(UnsignedType.class, str);
}
public static UnsignedType[] values() {
return (UnsignedType[]) $VALUES.clone();
}
public final ClassId getArrayClassId() {
return this.arrayClassId;
}
public final ClassId getClassId() {
return this.classId;
}
public final Name getTypeName() {
return this.typeName;
}
}

View File

@@ -0,0 +1,88 @@
package kotlin.reflect.jvm.internal.impl.builtins;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeUtils;
@SourceDebugExtension({"SMAP\nUnsignedType.kt\nKotlin\n*S Kotlin\n*F\n+ 1 UnsignedType.kt\norg/jetbrains/kotlin/builtins/UnsignedTypes\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,122:1\n11065#2:123\n11400#2,3:124\n11065#2:127\n11400#2,3:128\n11400#2,3:131\n*S KotlinDebug\n*F\n+ 1 UnsignedType.kt\norg/jetbrains/kotlin/builtins/UnsignedTypes\n*L\n36#1:123\n36#1:124,3\n37#1:127\n37#1:128,3\n47#1:131,3\n*E\n"})
/* loaded from: classes3.dex */
public final class UnsignedTypes {
public static final UnsignedTypes INSTANCE = new UnsignedTypes();
private static final HashMap<ClassId, ClassId> arrayClassIdToUnsignedClassId;
private static final Set<Name> arrayClassesShortNames;
private static final Set<Name> unsignedArrayTypeNames;
private static final HashMap<UnsignedArrayType, Name> unsignedArrayTypeToArrayCall;
private static final HashMap<ClassId, ClassId> unsignedClassIdToArrayClassId;
private static final Set<Name> unsignedTypeNames;
static {
UnsignedType[] values = UnsignedType.values();
ArrayList arrayList = new ArrayList(values.length);
for (UnsignedType unsignedType : values) {
arrayList.add(unsignedType.getTypeName());
}
unsignedTypeNames = CollectionsKt.toSet(arrayList);
UnsignedArrayType[] values2 = UnsignedArrayType.values();
ArrayList arrayList2 = new ArrayList(values2.length);
for (UnsignedArrayType unsignedArrayType : values2) {
arrayList2.add(unsignedArrayType.getTypeName());
}
unsignedArrayTypeNames = CollectionsKt.toSet(arrayList2);
arrayClassIdToUnsignedClassId = new HashMap<>();
unsignedClassIdToArrayClassId = new HashMap<>();
unsignedArrayTypeToArrayCall = MapsKt.hashMapOf(TuplesKt.to(UnsignedArrayType.UBYTEARRAY, Name.identifier("ubyteArrayOf")), TuplesKt.to(UnsignedArrayType.USHORTARRAY, Name.identifier("ushortArrayOf")), TuplesKt.to(UnsignedArrayType.UINTARRAY, Name.identifier("uintArrayOf")), TuplesKt.to(UnsignedArrayType.ULONGARRAY, Name.identifier("ulongArrayOf")));
UnsignedType[] values3 = UnsignedType.values();
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (UnsignedType unsignedType2 : values3) {
linkedHashSet.add(unsignedType2.getArrayClassId().getShortClassName());
}
arrayClassesShortNames = linkedHashSet;
for (UnsignedType unsignedType3 : UnsignedType.values()) {
arrayClassIdToUnsignedClassId.put(unsignedType3.getArrayClassId(), unsignedType3.getClassId());
unsignedClassIdToArrayClassId.put(unsignedType3.getClassId(), unsignedType3.getArrayClassId());
}
}
private UnsignedTypes() {
}
@JvmStatic
public static final boolean isUnsignedType(KotlinType type) {
ClassifierDescriptor mo1394getDeclarationDescriptor;
Intrinsics.checkNotNullParameter(type, "type");
if (TypeUtils.noExpectedType(type) || (mo1394getDeclarationDescriptor = type.getConstructor().mo1394getDeclarationDescriptor()) == null) {
return false;
}
return INSTANCE.isUnsignedClass(mo1394getDeclarationDescriptor);
}
public final ClassId getUnsignedClassIdByArrayClassId(ClassId arrayClassId) {
Intrinsics.checkNotNullParameter(arrayClassId, "arrayClassId");
return arrayClassIdToUnsignedClassId.get(arrayClassId);
}
public final boolean isShortNameOfUnsignedArray(Name name) {
Intrinsics.checkNotNullParameter(name, "name");
return arrayClassesShortNames.contains(name);
}
public final boolean isUnsignedClass(DeclarationDescriptor descriptor) {
Intrinsics.checkNotNullParameter(descriptor, "descriptor");
DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration();
return (containingDeclaration instanceof PackageFragmentDescriptor) && Intrinsics.areEqual(((PackageFragmentDescriptor) containingDeclaration).getFqName(), StandardNames.BUILT_INS_PACKAGE_FQ_NAME) && unsignedTypeNames.contains(descriptor.getName());
}
}

View File

@@ -0,0 +1,112 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.collections.SetsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.BuiltInsPackageFragment;
import kotlin.reflect.jvm.internal.impl.builtins.FunctionInterfacePackageFragment;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKindExtractor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory;
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.storage.StorageManager;
import kotlin.text.StringsKt__StringsJVMKt;
import kotlin.text.StringsKt__StringsKt;
@SourceDebugExtension({"SMAP\nBuiltInFictitiousFunctionClassFactory.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BuiltInFictitiousFunctionClassFactory.kt\norg/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,70:1\n800#2,11:71\n800#2,11:82\n*S KotlinDebug\n*F\n+ 1 BuiltInFictitiousFunctionClassFactory.kt\norg/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory\n*L\n55#1:71,11\n59#1:82,11\n*E\n"})
/* loaded from: classes3.dex */
public final class BuiltInFictitiousFunctionClassFactory implements ClassDescriptorFactory {
private final ModuleDescriptor module;
private final StorageManager storageManager;
public BuiltInFictitiousFunctionClassFactory(StorageManager storageManager, ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(module, "module");
this.storageManager = storageManager;
this.module = module;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public ClassDescriptor createClass(ClassId classId) {
boolean contains$default;
Intrinsics.checkNotNullParameter(classId, "classId");
if (classId.isLocal() || classId.isNestedClass()) {
return null;
}
String asString = classId.getRelativeClassName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
contains$default = StringsKt__StringsKt.contains$default(asString, (CharSequence) "Function", false, 2, (Object) null);
if (!contains$default) {
return null;
}
FqName packageFqName = classId.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName, "getPackageFqName(...)");
FunctionTypeKindExtractor.KindWithArity functionalClassKindWithArity = FunctionTypeKindExtractor.Companion.getDefault().getFunctionalClassKindWithArity(packageFqName, asString);
if (functionalClassKindWithArity == null) {
return null;
}
FunctionTypeKind component1 = functionalClassKindWithArity.component1();
int component2 = functionalClassKindWithArity.component2();
List<PackageFragmentDescriptor> fragments = this.module.getPackage(packageFqName).getFragments();
ArrayList arrayList = new ArrayList();
for (Object obj : fragments) {
if (obj instanceof BuiltInsPackageFragment) {
arrayList.add(obj);
}
}
ArrayList arrayList2 = new ArrayList();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Object next = it.next();
if (next instanceof FunctionInterfacePackageFragment) {
arrayList2.add(next);
}
}
PackageFragmentDescriptor packageFragmentDescriptor = (FunctionInterfacePackageFragment) CollectionsKt.firstOrNull((List) arrayList2);
if (packageFragmentDescriptor == null) {
packageFragmentDescriptor = (BuiltInsPackageFragment) CollectionsKt.first((List) arrayList);
}
return new FunctionClassDescriptor(this.storageManager, packageFragmentDescriptor, component1, component2);
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public Collection<ClassDescriptor> getAllContributedClassesIfPossible(FqName packageFqName) {
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
return SetsKt.emptySet();
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public boolean shouldCreateClass(FqName packageFqName, Name name) {
boolean startsWith$default;
boolean startsWith$default2;
boolean startsWith$default3;
boolean startsWith$default4;
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
Intrinsics.checkNotNullParameter(name, "name");
String asString = name.asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(asString, "Function", false, 2, null);
if (!startsWith$default) {
startsWith$default2 = StringsKt__StringsJVMKt.startsWith$default(asString, "KFunction", false, 2, null);
if (!startsWith$default2) {
startsWith$default3 = StringsKt__StringsJVMKt.startsWith$default(asString, "SuspendFunction", false, 2, null);
if (!startsWith$default3) {
startsWith$default4 = StringsKt__StringsJVMKt.startsWith$default(asString, "KSuspendFunction", false, 2, null);
if (!startsWith$default4) {
return false;
}
}
}
}
return FunctionTypeKindExtractor.Companion.getDefault().getFunctionalClassKindWithArity(packageFqName, asString) != null;
}
}

View File

@@ -0,0 +1,330 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import com.google.android.gms.measurement.internal.a;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.IntIterator;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.IntRange;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
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.DescriptorVisibilities;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.SupertypeLoopChecker;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.AbstractClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.TypeParameterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.AbstractClassTypeConstructor;
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.TypeAttributes;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
import kotlin.reflect.jvm.internal.impl.types.TypeProjectionImpl;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
import kotlin.reflect.jvm.internal.impl.utils.addToStdlib.AddToStdlibKt;
@SourceDebugExtension({"SMAP\nFunctionClassDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FunctionClassDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,146:1\n1549#2:147\n1620#2,3:148\n*S KotlinDebug\n*F\n+ 1 FunctionClassDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor\n*L\n54#1:147\n54#1:148,3\n*E\n"})
/* loaded from: classes3.dex */
public final class FunctionClassDescriptor extends AbstractClassDescriptor {
public static final Companion Companion = new Companion(null);
private static final ClassId functionClassId = new ClassId(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, Name.identifier("Function"));
private static final ClassId kFunctionClassId = new ClassId(StandardNames.KOTLIN_REFLECT_FQ_NAME, Name.identifier("KFunction"));
private final int arity;
private final PackageFragmentDescriptor containingDeclaration;
private final FunctionClassKind functionKind;
private final FunctionTypeKind functionTypeKind;
private final FunctionClassScope memberScope;
private final List<TypeParameterDescriptor> parameters;
private final StorageManager storageManager;
private final FunctionTypeConstructor typeConstructor;
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FunctionClassDescriptor(StorageManager storageManager, PackageFragmentDescriptor containingDeclaration, FunctionTypeKind functionTypeKind, int i) {
super(storageManager, functionTypeKind.numberedClassName(i));
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(containingDeclaration, "containingDeclaration");
Intrinsics.checkNotNullParameter(functionTypeKind, "functionTypeKind");
this.storageManager = storageManager;
this.containingDeclaration = containingDeclaration;
this.functionTypeKind = functionTypeKind;
this.arity = i;
this.typeConstructor = new FunctionTypeConstructor();
this.memberScope = new FunctionClassScope(storageManager, this);
ArrayList arrayList = new ArrayList();
IntRange intRange = new IntRange(1, i);
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(intRange, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = intRange.iterator();
while (it.hasNext()) {
_init_$typeParameter(arrayList, this, Variance.IN_VARIANCE, a.l(((IntIterator) it).nextInt(), "P"));
arrayList2.add(Unit.INSTANCE);
}
_init_$typeParameter(arrayList, this, Variance.OUT_VARIANCE, "R");
this.parameters = CollectionsKt.toList(arrayList);
this.functionKind = FunctionClassKind.Companion.getFunctionClassKind(this.functionTypeKind);
}
private static final void _init_$typeParameter(ArrayList<TypeParameterDescriptor> arrayList, FunctionClassDescriptor functionClassDescriptor, Variance variance, String str) {
arrayList.add(TypeParameterDescriptorImpl.createWithDefaultBound(functionClassDescriptor, Annotations.Companion.getEMPTY(), false, variance, Name.identifier(str), arrayList.size(), functionClassDescriptor.storageManager));
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated
public Annotations getAnnotations() {
return Annotations.Companion.getEMPTY();
}
public final int getArity() {
return this.arity;
}
public Void getCompanionObjectDescriptor() {
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters
public List<TypeParameterDescriptor> getDeclaredTypeParameters() {
return this.parameters;
}
public final FunctionTypeKind getFunctionTypeKind() {
return this.functionTypeKind;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
public ClassKind getKind() {
return ClassKind.INTERFACE;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
public Modality getModality() {
return Modality.ABSTRACT;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithSource
public SourceElement getSource() {
SourceElement NO_SOURCE = SourceElement.NO_SOURCE;
Intrinsics.checkNotNullExpressionValue(NO_SOURCE, "NO_SOURCE");
return NO_SOURCE;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
public TypeConstructor getTypeConstructor() {
return this.typeConstructor;
}
public Void getUnsubstitutedPrimaryConstructor() {
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() {
DescriptorVisibility PUBLIC = DescriptorVisibilities.PUBLIC;
Intrinsics.checkNotNullExpressionValue(PUBLIC, "PUBLIC");
return PUBLIC;
}
@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.MemberDescriptor
public boolean isExternal() {
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 false;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
public boolean isValue() {
return false;
}
public String toString() {
String asString = getName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
return asString;
}
@SourceDebugExtension({"SMAP\nFunctionClassDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FunctionClassDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor$FunctionTypeConstructor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,146:1\n1549#2:147\n1620#2,2:148\n1549#2:150\n1620#2,3:151\n1622#2:154\n*S KotlinDebug\n*F\n+ 1 FunctionClassDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor$FunctionTypeConstructor\n*L\n113#1:147\n113#1:148,2\n117#1:150\n117#1:151,3\n113#1:154\n*E\n"})
/* loaded from: classes3.dex */
public final class FunctionTypeConstructor extends AbstractClassTypeConstructor {
public FunctionTypeConstructor() {
super(FunctionClassDescriptor.this.storageManager);
}
@Override // kotlin.reflect.jvm.internal.impl.types.AbstractTypeConstructor
public Collection<KotlinType> computeSupertypes() {
List listOf;
int collectionSizeOrDefault;
int collectionSizeOrDefault2;
FunctionTypeKind functionTypeKind = FunctionClassDescriptor.this.getFunctionTypeKind();
FunctionTypeKind.Function function = FunctionTypeKind.Function.INSTANCE;
if (Intrinsics.areEqual(functionTypeKind, function)) {
listOf = CollectionsKt.listOf(FunctionClassDescriptor.functionClassId);
} else if (Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.KFunction.INSTANCE)) {
listOf = CollectionsKt.listOf((Object[]) new ClassId[]{FunctionClassDescriptor.kFunctionClassId, new ClassId(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, function.numberedClassName(FunctionClassDescriptor.this.getArity()))});
} else {
FunctionTypeKind.SuspendFunction suspendFunction = FunctionTypeKind.SuspendFunction.INSTANCE;
if (Intrinsics.areEqual(functionTypeKind, suspendFunction)) {
listOf = CollectionsKt.listOf(FunctionClassDescriptor.functionClassId);
} else {
if (!Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.KSuspendFunction.INSTANCE)) {
AddToStdlibKt.shouldNotBeCalled$default(null, 1, null);
throw null;
}
listOf = CollectionsKt.listOf((Object[]) new ClassId[]{FunctionClassDescriptor.kFunctionClassId, new ClassId(StandardNames.COROUTINES_PACKAGE_FQ_NAME, suspendFunction.numberedClassName(FunctionClassDescriptor.this.getArity()))});
}
}
ModuleDescriptor containingDeclaration = FunctionClassDescriptor.this.containingDeclaration.getContainingDeclaration();
List<ClassId> list = listOf;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
for (ClassId classId : list) {
ClassDescriptor findClassAcrossModuleDependencies = FindClassInModuleKt.findClassAcrossModuleDependencies(containingDeclaration, classId);
if (findClassAcrossModuleDependencies == null) {
throw new IllegalStateException(("Built-in class " + classId + " not found").toString());
}
List takeLast = CollectionsKt.takeLast(getParameters(), findClassAcrossModuleDependencies.getTypeConstructor().getParameters().size());
collectionSizeOrDefault2 = CollectionsKt__IterablesKt.collectionSizeOrDefault(takeLast, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault2);
Iterator it = takeLast.iterator();
while (it.hasNext()) {
arrayList2.add(new TypeProjectionImpl(((TypeParameterDescriptor) it.next()).getDefaultType()));
}
arrayList.add(KotlinTypeFactory.simpleNotNullType(TypeAttributes.Companion.getEmpty(), findClassAcrossModuleDependencies, arrayList2));
}
return CollectionsKt.toList(arrayList);
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public List<TypeParameterDescriptor> getParameters() {
return FunctionClassDescriptor.this.parameters;
}
@Override // kotlin.reflect.jvm.internal.impl.types.AbstractTypeConstructor
public SupertypeLoopChecker getSupertypeLoopChecker() {
return SupertypeLoopChecker.EMPTY.INSTANCE;
}
@Override // kotlin.reflect.jvm.internal.impl.types.TypeConstructor
public boolean isDenotable() {
return true;
}
public String toString() {
return mo1394getDeclarationDescriptor().toString();
}
@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 FunctionClassDescriptor mo1394getDeclarationDescriptor() {
return FunctionClassDescriptor.this;
}
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
/* renamed from: getCompanionObjectDescriptor, reason: collision with other method in class */
public /* bridge */ /* synthetic */ ClassDescriptor mo1387getCompanionObjectDescriptor() {
return (ClassDescriptor) getCompanionObjectDescriptor();
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
public List<ClassConstructorDescriptor> getConstructors() {
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
public PackageFragmentDescriptor getContainingDeclaration() {
return this.containingDeclaration;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
public List<ClassDescriptor> getSealedSubclasses() {
return CollectionsKt.emptyList();
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
public MemberScope.Empty getStaticScope() {
return MemberScope.Empty.INSTANCE;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.ModuleAwareClassDescriptor
public FunctionClassScope getUnsubstitutedMemberScope(KotlinTypeRefiner kotlinTypeRefiner) {
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
return this.memberScope;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
/* renamed from: getUnsubstitutedPrimaryConstructor, reason: collision with other method in class */
public /* bridge */ /* synthetic */ ClassConstructorDescriptor mo1388getUnsubstitutedPrimaryConstructor() {
return (ClassConstructorDescriptor) getUnsubstitutedPrimaryConstructor();
}
}

View File

@@ -0,0 +1,58 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
/* 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 FunctionClassKind {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ FunctionClassKind[] $VALUES;
public static final Companion Companion;
public static final FunctionClassKind Function = new FunctionClassKind("Function", 0);
public static final FunctionClassKind SuspendFunction = new FunctionClassKind("SuspendFunction", 1);
public static final FunctionClassKind KFunction = new FunctionClassKind("KFunction", 2);
public static final FunctionClassKind KSuspendFunction = new FunctionClassKind("KSuspendFunction", 3);
public static final FunctionClassKind UNKNOWN = new FunctionClassKind("UNKNOWN", 4);
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final FunctionClassKind getFunctionClassKind(FunctionTypeKind functionTypeKind) {
Intrinsics.checkNotNullParameter(functionTypeKind, "functionTypeKind");
return Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.Function.INSTANCE) ? FunctionClassKind.Function : Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.SuspendFunction.INSTANCE) ? FunctionClassKind.SuspendFunction : Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.KFunction.INSTANCE) ? FunctionClassKind.KFunction : Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.KSuspendFunction.INSTANCE) ? FunctionClassKind.KSuspendFunction : FunctionClassKind.UNKNOWN;
}
private Companion() {
}
}
private static final /* synthetic */ FunctionClassKind[] $values() {
return new FunctionClassKind[]{Function, SuspendFunction, KFunction, KSuspendFunction, UNKNOWN};
}
static {
FunctionClassKind[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
Companion = new Companion(null);
}
private FunctionClassKind(String str, int i) {
}
public static FunctionClassKind valueOf(String str) {
return (FunctionClassKind) Enum.valueOf(FunctionClassKind.class, str);
}
public static FunctionClassKind[] values() {
return (FunctionClassKind[]) $VALUES.clone();
}
}

View File

@@ -0,0 +1,28 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
/* loaded from: classes3.dex */
public final class FunctionClassScope extends GivenFunctionsMemberScope {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FunctionClassScope(StorageManager storageManager, FunctionClassDescriptor containingClass) {
super(storageManager, containingClass);
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(containingClass, "containingClass");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope
public List<FunctionDescriptor> computeDeclaredFunctions() {
ClassDescriptor containingClass = getContainingClass();
Intrinsics.checkNotNull(containingClass, "null cannot be cast to non-null type org.jetbrains.kotlin.builtins.functions.FunctionClassDescriptor");
FunctionTypeKind functionTypeKind = ((FunctionClassDescriptor) containingClass).getFunctionTypeKind();
return Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.Function.INSTANCE) ? CollectionsKt.listOf(FunctionInvokeDescriptor.Factory.create((FunctionClassDescriptor) getContainingClass(), false)) : Intrinsics.areEqual(functionTypeKind, FunctionTypeKind.SuspendFunction.INSTANCE) ? CollectionsKt.listOf(FunctionInvokeDescriptor.Factory.create((FunctionClassDescriptor) getContainingClass(), true)) : CollectionsKt.emptyList();
}
}

View File

@@ -0,0 +1,222 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.IndexedValue;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.FunctionTypesKt;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
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.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.FunctionDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ValueParameterDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
import kotlin.reflect.jvm.internal.impl.types.Variance;
import kotlin.reflect.jvm.internal.impl.util.OperatorNameConventions;
@SourceDebugExtension({"SMAP\nFunctionInvokeDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FunctionInvokeDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionInvokeDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,161:1\n2624#2,3:162\n1549#2:165\n1620#2,3:166\n1726#2,3:169\n1549#2:172\n1620#2,3:173\n1747#2,3:176\n*S KotlinDebug\n*F\n+ 1 FunctionInvokeDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionInvokeDescriptor\n*L\n63#1:162,3\n64#1:165\n64#1:166,3\n88#1:169,3\n92#1:172\n92#1:173,3\n106#1:176,3\n*E\n"})
/* loaded from: classes3.dex */
public final class FunctionInvokeDescriptor extends SimpleFunctionDescriptorImpl {
public static final Factory Factory = new Factory(null);
@SourceDebugExtension({"SMAP\nFunctionInvokeDescriptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FunctionInvokeDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionInvokeDescriptor$Factory\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,161:1\n959#2,7:162\n1549#2:169\n1620#2,3:170\n*S KotlinDebug\n*F\n+ 1 FunctionInvokeDescriptor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionInvokeDescriptor$Factory\n*L\n122#1:162,7\n124#1:169\n124#1:170,3\n*E\n"})
/* loaded from: classes3.dex */
public static final class Factory {
public /* synthetic */ Factory(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private final ValueParameterDescriptor createValueParameter(FunctionInvokeDescriptor functionInvokeDescriptor, int i, TypeParameterDescriptor typeParameterDescriptor) {
String lowerCase;
String asString = typeParameterDescriptor.getName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
if (Intrinsics.areEqual(asString, "T")) {
lowerCase = "instance";
} else if (Intrinsics.areEqual(asString, "E")) {
lowerCase = "receiver";
} else {
lowerCase = asString.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
}
Annotations empty = Annotations.Companion.getEMPTY();
Name identifier = Name.identifier(lowerCase);
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
SimpleType defaultType = typeParameterDescriptor.getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
SourceElement NO_SOURCE = SourceElement.NO_SOURCE;
Intrinsics.checkNotNullExpressionValue(NO_SOURCE, "NO_SOURCE");
return new ValueParameterDescriptorImpl(functionInvokeDescriptor, null, i, empty, identifier, defaultType, false, false, false, null, NO_SOURCE);
}
public final FunctionInvokeDescriptor create(FunctionClassDescriptor functionClass, boolean z3) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(functionClass, "functionClass");
List<TypeParameterDescriptor> declaredTypeParameters = functionClass.getDeclaredTypeParameters();
FunctionInvokeDescriptor functionInvokeDescriptor = new FunctionInvokeDescriptor(functionClass, null, CallableMemberDescriptor.Kind.DECLARATION, z3, null);
ReceiverParameterDescriptor thisAsReceiverParameter = functionClass.getThisAsReceiverParameter();
List<ReceiverParameterDescriptor> emptyList = CollectionsKt.emptyList();
List<? extends TypeParameterDescriptor> emptyList2 = CollectionsKt.emptyList();
ArrayList arrayList = new ArrayList();
for (Object obj : declaredTypeParameters) {
if (((TypeParameterDescriptor) obj).getVariance() != Variance.IN_VARIANCE) {
break;
}
arrayList.add(obj);
}
Iterable<IndexedValue> withIndex = CollectionsKt.withIndex(arrayList);
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(withIndex, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault);
for (IndexedValue indexedValue : withIndex) {
arrayList2.add(FunctionInvokeDescriptor.Factory.createValueParameter(functionInvokeDescriptor, indexedValue.getIndex(), (TypeParameterDescriptor) indexedValue.getValue()));
}
functionInvokeDescriptor.initialize((ReceiverParameterDescriptor) null, thisAsReceiverParameter, emptyList, emptyList2, (List<ValueParameterDescriptor>) arrayList2, (KotlinType) ((TypeParameterDescriptor) CollectionsKt.last((List) declaredTypeParameters)).getDefaultType(), Modality.ABSTRACT, DescriptorVisibilities.PUBLIC);
functionInvokeDescriptor.setHasSynthesizedParameterNames(true);
return functionInvokeDescriptor;
}
private Factory() {
}
}
public /* synthetic */ FunctionInvokeDescriptor(DeclarationDescriptor declarationDescriptor, FunctionInvokeDescriptor functionInvokeDescriptor, CallableMemberDescriptor.Kind kind, boolean z3, DefaultConstructorMarker defaultConstructorMarker) {
this(declarationDescriptor, functionInvokeDescriptor, kind, z3);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r9v5, types: [java.lang.Object, kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl$CopyConfiguration] */
private final FunctionDescriptor replaceParameterNames(List<Name> list) {
int collectionSizeOrDefault;
Name name;
int size = getValueParameters().size() - list.size();
boolean z3 = true;
if (size == 0) {
List<ValueParameterDescriptor> valueParameters = getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
List<Pair> zip = CollectionsKt.zip(list, valueParameters);
if (!(zip instanceof Collection) || !zip.isEmpty()) {
for (Pair pair : zip) {
if (!Intrinsics.areEqual((Name) pair.component1(), ((ValueParameterDescriptor) pair.component2()).getName())) {
}
}
}
return this;
}
List<ValueParameterDescriptor> valueParameters2 = getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters2, "getValueParameters(...)");
List<ValueParameterDescriptor> list2 = valueParameters2;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
for (ValueParameterDescriptor valueParameterDescriptor : list2) {
Name name2 = valueParameterDescriptor.getName();
Intrinsics.checkNotNullExpressionValue(name2, "getName(...)");
int index = valueParameterDescriptor.getIndex();
int i = index - size;
if (i >= 0 && (name = list.get(i)) != null) {
name2 = name;
}
arrayList.add(valueParameterDescriptor.copy(this, name2, index));
}
FunctionDescriptorImpl.CopyConfiguration newCopyBuilder = newCopyBuilder(TypeSubstitutor.EMPTY);
List<Name> list3 = list;
if (!(list3 instanceof Collection) || !list3.isEmpty()) {
Iterator<T> it = list3.iterator();
while (it.hasNext()) {
if (((Name) it.next()) == null) {
break;
}
}
}
z3 = false;
?? original = newCopyBuilder.setHasSynthesizedParameterNames(z3).setValueParameters2((List<ValueParameterDescriptor>) arrayList).setOriginal((CallableMemberDescriptor) getOriginal());
Intrinsics.checkNotNullExpressionValue(original, "setOriginal(...)");
FunctionDescriptor doSubstitute = super.doSubstitute(original);
Intrinsics.checkNotNull(doSubstitute);
return doSubstitute;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
public FunctionDescriptorImpl createSubstitutedCopy(DeclarationDescriptor newOwner, FunctionDescriptor functionDescriptor, CallableMemberDescriptor.Kind kind, Name name, Annotations annotations, SourceElement source) {
Intrinsics.checkNotNullParameter(newOwner, "newOwner");
Intrinsics.checkNotNullParameter(kind, "kind");
Intrinsics.checkNotNullParameter(annotations, "annotations");
Intrinsics.checkNotNullParameter(source, "source");
return new FunctionInvokeDescriptor(newOwner, (FunctionInvokeDescriptor) functionDescriptor, kind, isSuspend());
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl
public FunctionDescriptor doSubstitute(FunctionDescriptorImpl.CopyConfiguration configuration) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(configuration, "configuration");
FunctionInvokeDescriptor functionInvokeDescriptor = (FunctionInvokeDescriptor) super.doSubstitute(configuration);
if (functionInvokeDescriptor == null) {
return null;
}
List<ValueParameterDescriptor> valueParameters = functionInvokeDescriptor.getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
List<ValueParameterDescriptor> list = valueParameters;
if ((list instanceof Collection) && list.isEmpty()) {
return functionInvokeDescriptor;
}
Iterator<T> it = list.iterator();
while (it.hasNext()) {
KotlinType type = ((ValueParameterDescriptor) it.next()).getType();
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
if (FunctionTypesKt.extractParameterNameFromFunctionTypeArgument(type) != null) {
List<ValueParameterDescriptor> valueParameters2 = functionInvokeDescriptor.getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters2, "getValueParameters(...)");
List<ValueParameterDescriptor> list2 = valueParameters2;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it2 = list2.iterator();
while (it2.hasNext()) {
KotlinType type2 = ((ValueParameterDescriptor) it2.next()).getType();
Intrinsics.checkNotNullExpressionValue(type2, "getType(...)");
arrayList.add(FunctionTypesKt.extractParameterNameFromFunctionTypeArgument(type2));
}
return functionInvokeDescriptor.replaceParameterNames(arrayList);
}
}
return functionInvokeDescriptor;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
public boolean isExternal() {
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor
public boolean isInline() {
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl, kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor
public boolean isTailrec() {
return false;
}
private FunctionInvokeDescriptor(DeclarationDescriptor declarationDescriptor, FunctionInvokeDescriptor functionInvokeDescriptor, CallableMemberDescriptor.Kind kind, boolean z3) {
super(declarationDescriptor, functionInvokeDescriptor, Annotations.Companion.getEMPTY(), OperatorNameConventions.INVOKE, kind, SourceElement.NO_SOURCE);
setOperator(true);
setSuspend(z3);
setHasStableParameterNames(false);
}
}

View File

@@ -0,0 +1,82 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import com.google.android.gms.measurement.internal.a;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
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 abstract class FunctionTypeKind {
private final ClassId annotationOnInvokeClassId;
private final String classNamePrefix;
private final boolean isReflectType;
private final FqName packageFqName;
/* loaded from: classes3.dex */
public static final class Function extends FunctionTypeKind {
public static final Function INSTANCE = new Function();
private Function() {
super(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, "Function", false, null);
}
}
/* loaded from: classes3.dex */
public static final class KFunction extends FunctionTypeKind {
public static final KFunction INSTANCE = new KFunction();
private KFunction() {
super(StandardNames.KOTLIN_REFLECT_FQ_NAME, "KFunction", true, null);
}
}
/* loaded from: classes3.dex */
public static final class KSuspendFunction extends FunctionTypeKind {
public static final KSuspendFunction INSTANCE = new KSuspendFunction();
private KSuspendFunction() {
super(StandardNames.KOTLIN_REFLECT_FQ_NAME, "KSuspendFunction", true, null);
}
}
/* loaded from: classes3.dex */
public static final class SuspendFunction extends FunctionTypeKind {
public static final SuspendFunction INSTANCE = new SuspendFunction();
private SuspendFunction() {
super(StandardNames.COROUTINES_PACKAGE_FQ_NAME, "SuspendFunction", false, null);
}
}
public FunctionTypeKind(FqName packageFqName, String classNamePrefix, boolean z3, ClassId classId) {
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
Intrinsics.checkNotNullParameter(classNamePrefix, "classNamePrefix");
this.packageFqName = packageFqName;
this.classNamePrefix = classNamePrefix;
this.isReflectType = z3;
this.annotationOnInvokeClassId = classId;
}
public final String getClassNamePrefix() {
return this.classNamePrefix;
}
public final FqName getPackageFqName() {
return this.packageFqName;
}
public final Name numberedClassName(int i) {
Name identifier = Name.identifier(this.classNamePrefix + i);
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
return identifier;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.packageFqName);
sb.append('.');
return a.n(sb, this.classNamePrefix, 'N');
}
}

View File

@@ -0,0 +1,148 @@
package kotlin.reflect.jvm.internal.impl.builtins.functions;
import C.w;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.text.StringsKt__StringsJVMKt;
@SourceDebugExtension({"SMAP\nFunctionTypeKindExtractor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FunctionTypeKindExtractor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionTypeKindExtractor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,70:1\n1477#2:71\n1502#2,3:72\n1505#2,3:82\n1747#2,3:85\n372#3,7:75\n*S KotlinDebug\n*F\n+ 1 FunctionTypeKindExtractor.kt\norg/jetbrains/kotlin/builtins/functions/FunctionTypeKindExtractor\n*L\n32#1:71\n32#1:72,3\n32#1:82,3\n54#1:85,3\n32#1:75,7\n*E\n"})
/* loaded from: classes3.dex */
public final class FunctionTypeKindExtractor {
public static final Companion Companion = new Companion(null);
private static final FunctionTypeKindExtractor Default = new FunctionTypeKindExtractor(CollectionsKt.listOf((Object[]) new FunctionTypeKind[]{FunctionTypeKind.Function.INSTANCE, FunctionTypeKind.SuspendFunction.INSTANCE, FunctionTypeKind.KFunction.INSTANCE, FunctionTypeKind.KSuspendFunction.INSTANCE}));
private final List<FunctionTypeKind> kinds;
private final Map<FqName, List<FunctionTypeKind>> knownKindsByPackageFqName;
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final FunctionTypeKindExtractor getDefault() {
return FunctionTypeKindExtractor.Default;
}
private Companion() {
}
}
/* loaded from: classes3.dex */
public static final class KindWithArity {
private final int arity;
private final FunctionTypeKind kind;
public KindWithArity(FunctionTypeKind kind, int i) {
Intrinsics.checkNotNullParameter(kind, "kind");
this.kind = kind;
this.arity = i;
}
public final FunctionTypeKind component1() {
return this.kind;
}
public final int component2() {
return this.arity;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof KindWithArity)) {
return false;
}
KindWithArity kindWithArity = (KindWithArity) obj;
return Intrinsics.areEqual(this.kind, kindWithArity.kind) && this.arity == kindWithArity.arity;
}
public final FunctionTypeKind getKind() {
return this.kind;
}
public int hashCode() {
return Integer.hashCode(this.arity) + (this.kind.hashCode() * 31);
}
public String toString() {
StringBuilder sb = new StringBuilder("KindWithArity(kind=");
sb.append(this.kind);
sb.append(", arity=");
return w.p(sb, this.arity, ')');
}
}
/* JADX WARN: Multi-variable type inference failed */
public FunctionTypeKindExtractor(List<? extends FunctionTypeKind> kinds) {
Intrinsics.checkNotNullParameter(kinds, "kinds");
this.kinds = kinds;
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Object obj : kinds) {
FqName packageFqName = ((FunctionTypeKind) obj).getPackageFqName();
Object obj2 = linkedHashMap.get(packageFqName);
if (obj2 == null) {
obj2 = new ArrayList();
linkedHashMap.put(packageFqName, obj2);
}
((List) obj2).add(obj);
}
this.knownKindsByPackageFqName = linkedHashMap;
}
private final Integer toInt(String str) {
if (str.length() == 0) {
return null;
}
int length = str.length();
int i = 0;
for (int i4 = 0; i4 < length; i4++) {
int charAt = str.charAt(i4) - '0';
if (charAt < 0 || charAt >= 10) {
return null;
}
i = (i * 10) + charAt;
}
return Integer.valueOf(i);
}
public final FunctionTypeKind getFunctionalClassKind(FqName packageFqName, String className) {
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
Intrinsics.checkNotNullParameter(className, "className");
KindWithArity functionalClassKindWithArity = getFunctionalClassKindWithArity(packageFqName, className);
if (functionalClassKindWithArity != null) {
return functionalClassKindWithArity.getKind();
}
return null;
}
public final KindWithArity getFunctionalClassKindWithArity(FqName packageFqName, String className) {
boolean startsWith$default;
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
Intrinsics.checkNotNullParameter(className, "className");
List<FunctionTypeKind> list = this.knownKindsByPackageFqName.get(packageFqName);
if (list == null) {
return null;
}
for (FunctionTypeKind functionTypeKind : list) {
startsWith$default = StringsKt__StringsJVMKt.startsWith$default(className, functionTypeKind.getClassNamePrefix(), false, 2, null);
if (startsWith$default) {
String substring = className.substring(functionTypeKind.getClassNamePrefix().length());
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
Integer num = toInt(substring);
if (num != null) {
return new KindWithArity(functionTypeKind, num.intValue());
}
}
}
return null;
}
}

View File

@@ -0,0 +1,60 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
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.DescriptorVisibilities;
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.SourceElement;
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.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
/* loaded from: classes3.dex */
public final class CloneableClassScope extends GivenFunctionsMemberScope {
private static final Name CLONE_NAME;
public static final Companion Companion = new Companion(null);
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final Name getCLONE_NAME() {
return CloneableClassScope.CLONE_NAME;
}
private Companion() {
}
}
static {
Name identifier = Name.identifier("clone");
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
CLONE_NAME = identifier;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CloneableClassScope(StorageManager storageManager, ClassDescriptor containingClass) {
super(storageManager, containingClass);
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(containingClass, "containingClass");
}
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.GivenFunctionsMemberScope
public List<FunctionDescriptor> computeDeclaredFunctions() {
SimpleFunctionDescriptorImpl create = SimpleFunctionDescriptorImpl.create(getContainingClass(), Annotations.Companion.getEMPTY(), CLONE_NAME, CallableMemberDescriptor.Kind.DECLARATION, SourceElement.NO_SOURCE);
create.initialize((ReceiverParameterDescriptor) null, getContainingClass().getThisAsReceiverParameter(), CollectionsKt.emptyList(), CollectionsKt.emptyList(), CollectionsKt.emptyList(), (KotlinType) DescriptorUtilsKt.getBuiltIns(getContainingClass()).getAnyType(), Modality.OPEN, DescriptorVisibilities.PROTECTED);
return CollectionsKt.listOf(create);
}
}

View File

@@ -0,0 +1,36 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter;
import kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager;
/* loaded from: classes3.dex */
final class FallbackBuiltIns extends KotlinBuiltIns {
public static final Companion Companion = new Companion(null);
private static final KotlinBuiltIns Instance = new FallbackBuiltIns();
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final KotlinBuiltIns getInstance() {
return FallbackBuiltIns.Instance;
}
private Companion() {
}
}
private FallbackBuiltIns() {
super(new LockBasedStorageManager("FallbackBuiltIns"));
createBuiltInsModule(true);
}
@Override // kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns
public PlatformDependentDeclarationFilter.All getPlatformDependentDeclarationFilter() {
return PlatformDependentDeclarationFilter.All.INSTANCE;
}
}

View File

@@ -0,0 +1,381 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import com.google.android.gms.measurement.internal.a;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.reflect.jvm.internal.impl.builtins.CompanionObjectMapping;
import kotlin.reflect.jvm.internal.impl.builtins.PrimitiveType;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.builtins.functions.FunctionTypeKind;
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.FqNamesUtilKt;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.name.SpecialNames;
import kotlin.reflect.jvm.internal.impl.name.StandardClassIds;
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmPrimitiveType;
import kotlin.text.StringsKt;
import kotlin.text.StringsKt__StringsKt;
@SourceDebugExtension({"SMAP\nJavaToKotlinClassMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaToKotlinClassMap.kt\norg/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,219:1\n49#1,2:221\n49#1,2:223\n49#1,2:225\n49#1,2:227\n49#1,2:229\n49#1,2:231\n49#1,2:233\n49#1,2:235\n1#2:220\n*S KotlinDebug\n*F\n+ 1 JavaToKotlinClassMap.kt\norg/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap\n*L\n54#1:221,2\n55#1:223,2\n56#1:225,2\n57#1:227,2\n58#1:229,2\n59#1:231,2\n60#1:233,2\n61#1:235,2\n*E\n"})
/* loaded from: classes3.dex */
public final class JavaToKotlinClassMap {
private static final ClassId CLASS_CLASS_ID;
private static final ClassId FUNCTION_N_CLASS_ID;
private static final FqName FUNCTION_N_FQ_NAME;
public static final JavaToKotlinClassMap INSTANCE;
private static final ClassId K_CLASS_CLASS_ID;
private static final ClassId K_FUNCTION_CLASS_ID;
private static final String NUMBERED_FUNCTION_PREFIX;
private static final String NUMBERED_K_FUNCTION_PREFIX;
private static final String NUMBERED_K_SUSPEND_FUNCTION_PREFIX;
private static final String NUMBERED_SUSPEND_FUNCTION_PREFIX;
private static final HashMap<FqNameUnsafe, ClassId> javaToKotlin;
private static final HashMap<FqNameUnsafe, ClassId> kotlinToJava;
private static final List<PlatformMutabilityMapping> mutabilityMappings;
private static final HashMap<FqNameUnsafe, FqName> mutableToReadOnly;
private static final HashMap<ClassId, ClassId> mutableToReadOnlyClassId;
private static final HashMap<FqNameUnsafe, FqName> readOnlyToMutable;
private static final HashMap<ClassId, ClassId> readOnlyToMutableClassId;
/* loaded from: classes3.dex */
public static final class PlatformMutabilityMapping {
private final ClassId javaClass;
private final ClassId kotlinMutable;
private final ClassId kotlinReadOnly;
public PlatformMutabilityMapping(ClassId javaClass, ClassId kotlinReadOnly, ClassId kotlinMutable) {
Intrinsics.checkNotNullParameter(javaClass, "javaClass");
Intrinsics.checkNotNullParameter(kotlinReadOnly, "kotlinReadOnly");
Intrinsics.checkNotNullParameter(kotlinMutable, "kotlinMutable");
this.javaClass = javaClass;
this.kotlinReadOnly = kotlinReadOnly;
this.kotlinMutable = kotlinMutable;
}
public final ClassId component1() {
return this.javaClass;
}
public final ClassId component2() {
return this.kotlinReadOnly;
}
public final ClassId component3() {
return this.kotlinMutable;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof PlatformMutabilityMapping)) {
return false;
}
PlatformMutabilityMapping platformMutabilityMapping = (PlatformMutabilityMapping) obj;
return Intrinsics.areEqual(this.javaClass, platformMutabilityMapping.javaClass) && Intrinsics.areEqual(this.kotlinReadOnly, platformMutabilityMapping.kotlinReadOnly) && Intrinsics.areEqual(this.kotlinMutable, platformMutabilityMapping.kotlinMutable);
}
public final ClassId getJavaClass() {
return this.javaClass;
}
public int hashCode() {
return this.kotlinMutable.hashCode() + ((this.kotlinReadOnly.hashCode() + (this.javaClass.hashCode() * 31)) * 31);
}
public String toString() {
return "PlatformMutabilityMapping(javaClass=" + this.javaClass + ", kotlinReadOnly=" + this.kotlinReadOnly + ", kotlinMutable=" + this.kotlinMutable + ')';
}
}
static {
JavaToKotlinClassMap javaToKotlinClassMap = new JavaToKotlinClassMap();
INSTANCE = javaToKotlinClassMap;
StringBuilder sb = new StringBuilder();
FunctionTypeKind.Function function = FunctionTypeKind.Function.INSTANCE;
sb.append(function.getPackageFqName().toString());
sb.append('.');
sb.append(function.getClassNamePrefix());
NUMBERED_FUNCTION_PREFIX = sb.toString();
StringBuilder sb2 = new StringBuilder();
FunctionTypeKind.KFunction kFunction = FunctionTypeKind.KFunction.INSTANCE;
sb2.append(kFunction.getPackageFqName().toString());
sb2.append('.');
sb2.append(kFunction.getClassNamePrefix());
NUMBERED_K_FUNCTION_PREFIX = sb2.toString();
StringBuilder sb3 = new StringBuilder();
FunctionTypeKind.SuspendFunction suspendFunction = FunctionTypeKind.SuspendFunction.INSTANCE;
sb3.append(suspendFunction.getPackageFqName().toString());
sb3.append('.');
sb3.append(suspendFunction.getClassNamePrefix());
NUMBERED_SUSPEND_FUNCTION_PREFIX = sb3.toString();
StringBuilder sb4 = new StringBuilder();
FunctionTypeKind.KSuspendFunction kSuspendFunction = FunctionTypeKind.KSuspendFunction.INSTANCE;
sb4.append(kSuspendFunction.getPackageFqName().toString());
sb4.append('.');
sb4.append(kSuspendFunction.getClassNamePrefix());
NUMBERED_K_SUSPEND_FUNCTION_PREFIX = sb4.toString();
ClassId classId = ClassId.topLevel(new FqName("kotlin.jvm.functions.FunctionN"));
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
FUNCTION_N_CLASS_ID = classId;
FqName asSingleFqName = classId.asSingleFqName();
Intrinsics.checkNotNullExpressionValue(asSingleFqName, "asSingleFqName(...)");
FUNCTION_N_FQ_NAME = asSingleFqName;
StandardClassIds standardClassIds = StandardClassIds.INSTANCE;
K_FUNCTION_CLASS_ID = standardClassIds.getKFunction();
K_CLASS_CLASS_ID = standardClassIds.getKClass();
CLASS_CLASS_ID = javaToKotlinClassMap.classId(Class.class);
javaToKotlin = new HashMap<>();
kotlinToJava = new HashMap<>();
mutableToReadOnly = new HashMap<>();
readOnlyToMutable = new HashMap<>();
mutableToReadOnlyClassId = new HashMap<>();
readOnlyToMutableClassId = new HashMap<>();
ClassId classId2 = ClassId.topLevel(StandardNames.FqNames.iterable);
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
FqName fqName = StandardNames.FqNames.mutableIterable;
FqName packageFqName = classId2.getPackageFqName();
FqName packageFqName2 = classId2.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName2, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Iterable.class), classId2, new ClassId(packageFqName, FqNamesUtilKt.tail(fqName, packageFqName2), false));
ClassId classId3 = ClassId.topLevel(StandardNames.FqNames.iterator);
Intrinsics.checkNotNullExpressionValue(classId3, "topLevel(...)");
FqName fqName2 = StandardNames.FqNames.mutableIterator;
FqName packageFqName3 = classId3.getPackageFqName();
FqName packageFqName4 = classId3.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName4, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping2 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Iterator.class), classId3, new ClassId(packageFqName3, FqNamesUtilKt.tail(fqName2, packageFqName4), false));
ClassId classId4 = ClassId.topLevel(StandardNames.FqNames.collection);
Intrinsics.checkNotNullExpressionValue(classId4, "topLevel(...)");
FqName fqName3 = StandardNames.FqNames.mutableCollection;
FqName packageFqName5 = classId4.getPackageFqName();
FqName packageFqName6 = classId4.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName6, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping3 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Collection.class), classId4, new ClassId(packageFqName5, FqNamesUtilKt.tail(fqName3, packageFqName6), false));
ClassId classId5 = ClassId.topLevel(StandardNames.FqNames.list);
Intrinsics.checkNotNullExpressionValue(classId5, "topLevel(...)");
FqName fqName4 = StandardNames.FqNames.mutableList;
FqName packageFqName7 = classId5.getPackageFqName();
FqName packageFqName8 = classId5.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName8, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping4 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(List.class), classId5, new ClassId(packageFqName7, FqNamesUtilKt.tail(fqName4, packageFqName8), false));
ClassId classId6 = ClassId.topLevel(StandardNames.FqNames.set);
Intrinsics.checkNotNullExpressionValue(classId6, "topLevel(...)");
FqName fqName5 = StandardNames.FqNames.mutableSet;
FqName packageFqName9 = classId6.getPackageFqName();
FqName packageFqName10 = classId6.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName10, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping5 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Set.class), classId6, new ClassId(packageFqName9, FqNamesUtilKt.tail(fqName5, packageFqName10), false));
ClassId classId7 = ClassId.topLevel(StandardNames.FqNames.listIterator);
Intrinsics.checkNotNullExpressionValue(classId7, "topLevel(...)");
FqName fqName6 = StandardNames.FqNames.mutableListIterator;
FqName packageFqName11 = classId7.getPackageFqName();
FqName packageFqName12 = classId7.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName12, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping6 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(ListIterator.class), classId7, new ClassId(packageFqName11, FqNamesUtilKt.tail(fqName6, packageFqName12), false));
FqName fqName7 = StandardNames.FqNames.map;
ClassId classId8 = ClassId.topLevel(fqName7);
Intrinsics.checkNotNullExpressionValue(classId8, "topLevel(...)");
FqName fqName8 = StandardNames.FqNames.mutableMap;
FqName packageFqName13 = classId8.getPackageFqName();
FqName packageFqName14 = classId8.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName14, "getPackageFqName(...)");
PlatformMutabilityMapping platformMutabilityMapping7 = new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Map.class), classId8, new ClassId(packageFqName13, FqNamesUtilKt.tail(fqName8, packageFqName14), false));
ClassId createNestedClassId = ClassId.topLevel(fqName7).createNestedClassId(StandardNames.FqNames.mapEntry.shortName());
Intrinsics.checkNotNullExpressionValue(createNestedClassId, "createNestedClassId(...)");
FqName fqName9 = StandardNames.FqNames.mutableMapEntry;
FqName packageFqName15 = createNestedClassId.getPackageFqName();
FqName packageFqName16 = createNestedClassId.getPackageFqName();
Intrinsics.checkNotNullExpressionValue(packageFqName16, "getPackageFqName(...)");
FqName tail = FqNamesUtilKt.tail(fqName9, packageFqName16);
List<PlatformMutabilityMapping> listOf = CollectionsKt.listOf((Object[]) new PlatformMutabilityMapping[]{platformMutabilityMapping, platformMutabilityMapping2, platformMutabilityMapping3, platformMutabilityMapping4, platformMutabilityMapping5, platformMutabilityMapping6, platformMutabilityMapping7, new PlatformMutabilityMapping(javaToKotlinClassMap.classId(Map.Entry.class), createNestedClassId, new ClassId(packageFqName15, tail, false))});
mutabilityMappings = listOf;
javaToKotlinClassMap.addTopLevel(Object.class, StandardNames.FqNames.any);
javaToKotlinClassMap.addTopLevel(String.class, StandardNames.FqNames.string);
javaToKotlinClassMap.addTopLevel(CharSequence.class, StandardNames.FqNames.charSequence);
javaToKotlinClassMap.addTopLevel(Throwable.class, StandardNames.FqNames.throwable);
javaToKotlinClassMap.addTopLevel(Cloneable.class, StandardNames.FqNames.cloneable);
javaToKotlinClassMap.addTopLevel(Number.class, StandardNames.FqNames.number);
javaToKotlinClassMap.addTopLevel(Comparable.class, StandardNames.FqNames.comparable);
javaToKotlinClassMap.addTopLevel(Enum.class, StandardNames.FqNames._enum);
javaToKotlinClassMap.addTopLevel(Annotation.class, StandardNames.FqNames.annotation);
Iterator<PlatformMutabilityMapping> it = listOf.iterator();
while (it.hasNext()) {
INSTANCE.addMapping(it.next());
}
for (JvmPrimitiveType jvmPrimitiveType : JvmPrimitiveType.values()) {
JavaToKotlinClassMap javaToKotlinClassMap2 = INSTANCE;
ClassId classId9 = ClassId.topLevel(jvmPrimitiveType.getWrapperFqName());
Intrinsics.checkNotNullExpressionValue(classId9, "topLevel(...)");
PrimitiveType primitiveType = jvmPrimitiveType.getPrimitiveType();
Intrinsics.checkNotNullExpressionValue(primitiveType, "getPrimitiveType(...)");
ClassId classId10 = ClassId.topLevel(StandardNames.getPrimitiveFqName(primitiveType));
Intrinsics.checkNotNullExpressionValue(classId10, "topLevel(...)");
javaToKotlinClassMap2.add(classId9, classId10);
}
for (ClassId classId11 : CompanionObjectMapping.INSTANCE.allClassesWithIntrinsicCompanions()) {
JavaToKotlinClassMap javaToKotlinClassMap3 = INSTANCE;
ClassId classId12 = ClassId.topLevel(new FqName("kotlin.jvm.internal." + classId11.getShortClassName().asString() + "CompanionObject"));
Intrinsics.checkNotNullExpressionValue(classId12, "topLevel(...)");
ClassId createNestedClassId2 = classId11.createNestedClassId(SpecialNames.DEFAULT_NAME_FOR_COMPANION_OBJECT);
Intrinsics.checkNotNullExpressionValue(createNestedClassId2, "createNestedClassId(...)");
javaToKotlinClassMap3.add(classId12, createNestedClassId2);
}
for (int i = 0; i < 23; i++) {
JavaToKotlinClassMap javaToKotlinClassMap4 = INSTANCE;
ClassId classId13 = ClassId.topLevel(new FqName(a.l(i, "kotlin.jvm.functions.Function")));
Intrinsics.checkNotNullExpressionValue(classId13, "topLevel(...)");
javaToKotlinClassMap4.add(classId13, StandardNames.getFunctionClassId(i));
javaToKotlinClassMap4.addKotlinToJava(new FqName(NUMBERED_K_FUNCTION_PREFIX + i), K_FUNCTION_CLASS_ID);
}
for (int i4 = 0; i4 < 22; i4++) {
FunctionTypeKind.KSuspendFunction kSuspendFunction2 = FunctionTypeKind.KSuspendFunction.INSTANCE;
INSTANCE.addKotlinToJava(new FqName((kSuspendFunction2.getPackageFqName().toString() + '.' + kSuspendFunction2.getClassNamePrefix()) + i4), K_FUNCTION_CLASS_ID);
}
JavaToKotlinClassMap javaToKotlinClassMap5 = INSTANCE;
FqName safe = StandardNames.FqNames.nothing.toSafe();
Intrinsics.checkNotNullExpressionValue(safe, "toSafe(...)");
javaToKotlinClassMap5.addKotlinToJava(safe, javaToKotlinClassMap5.classId(Void.class));
}
private JavaToKotlinClassMap() {
}
private final void add(ClassId classId, ClassId classId2) {
addJavaToKotlin(classId, classId2);
FqName asSingleFqName = classId2.asSingleFqName();
Intrinsics.checkNotNullExpressionValue(asSingleFqName, "asSingleFqName(...)");
addKotlinToJava(asSingleFqName, classId);
}
private final void addJavaToKotlin(ClassId classId, ClassId classId2) {
HashMap<FqNameUnsafe, ClassId> hashMap = javaToKotlin;
FqNameUnsafe unsafe = classId.asSingleFqName().toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
hashMap.put(unsafe, classId2);
}
private final void addKotlinToJava(FqName fqName, ClassId classId) {
HashMap<FqNameUnsafe, ClassId> hashMap = kotlinToJava;
FqNameUnsafe unsafe = fqName.toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
hashMap.put(unsafe, classId);
}
private final void addMapping(PlatformMutabilityMapping platformMutabilityMapping) {
ClassId component1 = platformMutabilityMapping.component1();
ClassId component2 = platformMutabilityMapping.component2();
ClassId component3 = platformMutabilityMapping.component3();
add(component1, component2);
FqName asSingleFqName = component3.asSingleFqName();
Intrinsics.checkNotNullExpressionValue(asSingleFqName, "asSingleFqName(...)");
addKotlinToJava(asSingleFqName, component1);
mutableToReadOnlyClassId.put(component3, component2);
readOnlyToMutableClassId.put(component2, component3);
FqName asSingleFqName2 = component2.asSingleFqName();
Intrinsics.checkNotNullExpressionValue(asSingleFqName2, "asSingleFqName(...)");
FqName asSingleFqName3 = component3.asSingleFqName();
Intrinsics.checkNotNullExpressionValue(asSingleFqName3, "asSingleFqName(...)");
HashMap<FqNameUnsafe, FqName> hashMap = mutableToReadOnly;
FqNameUnsafe unsafe = component3.asSingleFqName().toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe, "toUnsafe(...)");
hashMap.put(unsafe, asSingleFqName2);
HashMap<FqNameUnsafe, FqName> hashMap2 = readOnlyToMutable;
FqNameUnsafe unsafe2 = asSingleFqName2.toUnsafe();
Intrinsics.checkNotNullExpressionValue(unsafe2, "toUnsafe(...)");
hashMap2.put(unsafe2, asSingleFqName3);
}
private final void addTopLevel(Class<?> cls, FqNameUnsafe fqNameUnsafe) {
FqName safe = fqNameUnsafe.toSafe();
Intrinsics.checkNotNullExpressionValue(safe, "toSafe(...)");
addTopLevel(cls, safe);
}
private final ClassId classId(Class<?> cls) {
if (!cls.isPrimitive()) {
cls.isArray();
}
Class<?> declaringClass = cls.getDeclaringClass();
if (declaringClass == null) {
ClassId classId = ClassId.topLevel(new FqName(cls.getCanonicalName()));
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
return classId;
}
ClassId createNestedClassId = classId(declaringClass).createNestedClassId(Name.identifier(cls.getSimpleName()));
Intrinsics.checkNotNullExpressionValue(createNestedClassId, "createNestedClassId(...)");
return createNestedClassId;
}
private final boolean isKotlinFunctionWithBigArity(FqNameUnsafe fqNameUnsafe, String str) {
String substringAfter;
boolean startsWith$default;
Integer intOrNull;
String asString = fqNameUnsafe.asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
substringAfter = StringsKt__StringsKt.substringAfter(asString, str, "");
if (substringAfter.length() <= 0) {
return false;
}
startsWith$default = StringsKt__StringsKt.startsWith$default((CharSequence) substringAfter, '0', false, 2, (Object) null);
return (startsWith$default || (intOrNull = StringsKt.toIntOrNull(substringAfter)) == null || intOrNull.intValue() < 23) ? false : true;
}
public final FqName getFUNCTION_N_FQ_NAME() {
return FUNCTION_N_FQ_NAME;
}
public final List<PlatformMutabilityMapping> getMutabilityMappings() {
return mutabilityMappings;
}
public final boolean isMutable(FqNameUnsafe fqNameUnsafe) {
return mutableToReadOnly.containsKey(fqNameUnsafe);
}
public final boolean isReadOnly(FqNameUnsafe fqNameUnsafe) {
return readOnlyToMutable.containsKey(fqNameUnsafe);
}
public final ClassId mapJavaToKotlin(FqName fqName) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
return javaToKotlin.get(fqName.toUnsafe());
}
public final ClassId mapKotlinToJava(FqNameUnsafe kotlinFqName) {
Intrinsics.checkNotNullParameter(kotlinFqName, "kotlinFqName");
if (!isKotlinFunctionWithBigArity(kotlinFqName, NUMBERED_FUNCTION_PREFIX) && !isKotlinFunctionWithBigArity(kotlinFqName, NUMBERED_SUSPEND_FUNCTION_PREFIX)) {
if (!isKotlinFunctionWithBigArity(kotlinFqName, NUMBERED_K_FUNCTION_PREFIX) && !isKotlinFunctionWithBigArity(kotlinFqName, NUMBERED_K_SUSPEND_FUNCTION_PREFIX)) {
return kotlinToJava.get(kotlinFqName);
}
return K_FUNCTION_CLASS_ID;
}
return FUNCTION_N_CLASS_ID;
}
public final FqName mutableToReadOnly(FqNameUnsafe fqNameUnsafe) {
return mutableToReadOnly.get(fqNameUnsafe);
}
public final FqName readOnlyToMutable(FqNameUnsafe fqNameUnsafe) {
return readOnlyToMutable.get(fqNameUnsafe);
}
private final void addTopLevel(Class<?> cls, FqName fqName) {
ClassId classId = classId(cls);
ClassId classId2 = ClassId.topLevel(fqName);
Intrinsics.checkNotNullExpressionValue(classId2, "topLevel(...)");
add(classId, classId2);
}
}

View File

@@ -0,0 +1,88 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.util.Collection;
import kotlin.collections.CollectionsKt;
import kotlin.collections.SetsKt;
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.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
@SourceDebugExtension({"SMAP\nJavaToKotlinClassMapper.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JavaToKotlinClassMapper.kt\norg/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMapper\n*L\n1#1,80:1\n75#1,3:81\n75#1,3:84\n*S KotlinDebug\n*F\n+ 1 JavaToKotlinClassMapper.kt\norg/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMapper\n*L\n59#1:81,3\n65#1:84,3\n*E\n"})
/* loaded from: classes3.dex */
public final class JavaToKotlinClassMapper {
public static final JavaToKotlinClassMapper INSTANCE = new JavaToKotlinClassMapper();
private JavaToKotlinClassMapper() {
}
public static /* synthetic */ ClassDescriptor mapJavaToKotlin$default(JavaToKotlinClassMapper javaToKotlinClassMapper, FqName fqName, KotlinBuiltIns kotlinBuiltIns, Integer num, int i, Object obj) {
if ((i & 4) != 0) {
num = null;
}
return javaToKotlinClassMapper.mapJavaToKotlin(fqName, kotlinBuiltIns, num);
}
public final ClassDescriptor convertMutableToReadOnly(ClassDescriptor mutable) {
Intrinsics.checkNotNullParameter(mutable, "mutable");
FqName mutableToReadOnly = JavaToKotlinClassMap.INSTANCE.mutableToReadOnly(DescriptorUtils.getFqName(mutable));
if (mutableToReadOnly != null) {
ClassDescriptor builtInClassByFqName = DescriptorUtilsKt.getBuiltIns(mutable).getBuiltInClassByFqName(mutableToReadOnly);
Intrinsics.checkNotNullExpressionValue(builtInClassByFqName, "getBuiltInClassByFqName(...)");
return builtInClassByFqName;
}
throw new IllegalArgumentException("Given class " + mutable + " is not a mutable collection");
}
public final ClassDescriptor convertReadOnlyToMutable(ClassDescriptor readOnly) {
Intrinsics.checkNotNullParameter(readOnly, "readOnly");
FqName readOnlyToMutable = JavaToKotlinClassMap.INSTANCE.readOnlyToMutable(DescriptorUtils.getFqName(readOnly));
if (readOnlyToMutable != null) {
ClassDescriptor builtInClassByFqName = DescriptorUtilsKt.getBuiltIns(readOnly).getBuiltInClassByFqName(readOnlyToMutable);
Intrinsics.checkNotNullExpressionValue(builtInClassByFqName, "getBuiltInClassByFqName(...)");
return builtInClassByFqName;
}
throw new IllegalArgumentException("Given class " + readOnly + " is not a read-only collection");
}
public final boolean isMutable(ClassDescriptor mutable) {
Intrinsics.checkNotNullParameter(mutable, "mutable");
return JavaToKotlinClassMap.INSTANCE.isMutable(DescriptorUtils.getFqName(mutable));
}
public final boolean isReadOnly(ClassDescriptor readOnly) {
Intrinsics.checkNotNullParameter(readOnly, "readOnly");
return JavaToKotlinClassMap.INSTANCE.isReadOnly(DescriptorUtils.getFqName(readOnly));
}
public final ClassDescriptor mapJavaToKotlin(FqName fqName, KotlinBuiltIns builtIns, Integer num) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
ClassId mapJavaToKotlin = (num == null || !Intrinsics.areEqual(fqName, JavaToKotlinClassMap.INSTANCE.getFUNCTION_N_FQ_NAME())) ? JavaToKotlinClassMap.INSTANCE.mapJavaToKotlin(fqName) : StandardNames.getFunctionClassId(num.intValue());
if (mapJavaToKotlin != null) {
return builtIns.getBuiltInClassByFqName(mapJavaToKotlin.asSingleFqName());
}
return null;
}
public final Collection<ClassDescriptor> mapPlatformClass(FqName fqName, KotlinBuiltIns builtIns) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
Intrinsics.checkNotNullParameter(builtIns, "builtIns");
ClassDescriptor mapJavaToKotlin$default = mapJavaToKotlin$default(this, fqName, builtIns, null, 4, null);
if (mapJavaToKotlin$default == null) {
return SetsKt.emptySet();
}
FqName readOnlyToMutable = JavaToKotlinClassMap.INSTANCE.readOnlyToMutable(DescriptorUtilsKt.getFqNameUnsafe(mapJavaToKotlin$default));
if (readOnlyToMutable == null) {
return SetsKt.setOf(mapJavaToKotlin$default);
}
ClassDescriptor builtInClassByFqName = builtIns.getBuiltInClassByFqName(readOnlyToMutable);
Intrinsics.checkNotNullExpressionValue(builtInClassByFqName, "getBuiltInClassByFqName(...)");
return CollectionsKt.listOf((Object[]) new ClassDescriptor[]{mapJavaToKotlin$default, builtInClassByFqName});
}
}

View File

@@ -0,0 +1,144 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
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.PropertyReference1Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.KProperty;
import kotlin.reflect.jvm.internal.impl.builtins.BuiltInsPackageFragment;
import kotlin.reflect.jvm.internal.impl.builtins.StandardNames;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassKind;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassDescriptorImpl;
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;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
/* loaded from: classes3.dex */
public final class JvmBuiltInClassDescriptorFactory implements ClassDescriptorFactory {
private static final ClassId CLONEABLE_CLASS_ID;
private static final Name CLONEABLE_NAME;
private final NotNullLazyValue cloneable$delegate;
private final Function1<ModuleDescriptor, DeclarationDescriptor> computeContainingDeclaration;
private final ModuleDescriptor moduleDescriptor;
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmBuiltInClassDescriptorFactory.class), "cloneable", "getCloneable()Lorg/jetbrains/kotlin/descriptors/impl/ClassDescriptorImpl;"))};
public static final Companion Companion = new Companion(null);
private static final FqName KOTLIN_FQ_NAME = StandardNames.BUILT_INS_PACKAGE_FQ_NAME;
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final ClassId getCLONEABLE_CLASS_ID() {
return JvmBuiltInClassDescriptorFactory.CLONEABLE_CLASS_ID;
}
private Companion() {
}
}
static {
FqNameUnsafe fqNameUnsafe = StandardNames.FqNames.cloneable;
Name shortName = fqNameUnsafe.shortName();
Intrinsics.checkNotNullExpressionValue(shortName, "shortName(...)");
CLONEABLE_NAME = shortName;
ClassId classId = ClassId.topLevel(fqNameUnsafe.toSafe());
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
CLONEABLE_CLASS_ID = classId;
}
/* JADX WARN: Multi-variable type inference failed */
public JvmBuiltInClassDescriptorFactory(final StorageManager storageManager, ModuleDescriptor moduleDescriptor, Function1<? super ModuleDescriptor, ? extends DeclarationDescriptor> computeContainingDeclaration) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(moduleDescriptor, "moduleDescriptor");
Intrinsics.checkNotNullParameter(computeContainingDeclaration, "computeContainingDeclaration");
this.moduleDescriptor = moduleDescriptor;
this.computeContainingDeclaration = computeContainingDeclaration;
this.cloneable$delegate = storageManager.createLazyValue(new Function0<ClassDescriptorImpl>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInClassDescriptorFactory$cloneable$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 ClassDescriptorImpl invoke() {
Function1 function1;
ModuleDescriptor moduleDescriptor2;
Name name;
ModuleDescriptor moduleDescriptor3;
function1 = JvmBuiltInClassDescriptorFactory.this.computeContainingDeclaration;
moduleDescriptor2 = JvmBuiltInClassDescriptorFactory.this.moduleDescriptor;
DeclarationDescriptor declarationDescriptor = (DeclarationDescriptor) function1.invoke(moduleDescriptor2);
name = JvmBuiltInClassDescriptorFactory.CLONEABLE_NAME;
Modality modality = Modality.ABSTRACT;
ClassKind classKind = ClassKind.INTERFACE;
moduleDescriptor3 = JvmBuiltInClassDescriptorFactory.this.moduleDescriptor;
ClassDescriptorImpl classDescriptorImpl = new ClassDescriptorImpl(declarationDescriptor, name, modality, classKind, CollectionsKt.listOf(moduleDescriptor3.getBuiltIns().getAnyType()), SourceElement.NO_SOURCE, false, storageManager);
classDescriptorImpl.initialize(new CloneableClassScope(storageManager, classDescriptorImpl), SetsKt.emptySet(), null);
return classDescriptorImpl;
}
});
}
private final ClassDescriptorImpl getCloneable() {
return (ClassDescriptorImpl) StorageKt.getValue(this.cloneable$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public ClassDescriptor createClass(ClassId classId) {
Intrinsics.checkNotNullParameter(classId, "classId");
if (Intrinsics.areEqual(classId, CLONEABLE_CLASS_ID)) {
return getCloneable();
}
return null;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public Collection<ClassDescriptor> getAllContributedClassesIfPossible(FqName packageFqName) {
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
return Intrinsics.areEqual(packageFqName, KOTLIN_FQ_NAME) ? SetsKt.setOf(getCloneable()) : SetsKt.emptySet();
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory
public boolean shouldCreateClass(FqName packageFqName, Name name) {
Intrinsics.checkNotNullParameter(packageFqName, "packageFqName");
Intrinsics.checkNotNullParameter(name, "name");
return Intrinsics.areEqual(name, CLONEABLE_NAME) && Intrinsics.areEqual(packageFqName, KOTLIN_FQ_NAME);
}
public /* synthetic */ JvmBuiltInClassDescriptorFactory(StorageManager storageManager, ModuleDescriptor moduleDescriptor, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(storageManager, moduleDescriptor, (i & 4) != 0 ? new Function1<ModuleDescriptor, BuiltInsPackageFragment>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInClassDescriptorFactory.1
@Override // kotlin.jvm.functions.Function1
public final BuiltInsPackageFragment invoke(ModuleDescriptor module) {
Intrinsics.checkNotNullParameter(module, "module");
List<PackageFragmentDescriptor> fragments = module.getPackage(JvmBuiltInClassDescriptorFactory.KOTLIN_FQ_NAME).getFragments();
ArrayList arrayList = new ArrayList();
for (Object obj : fragments) {
if (obj instanceof BuiltInsPackageFragment) {
arrayList.add(obj);
}
}
return (BuiltInsPackageFragment) CollectionsKt.first((List) arrayList);
}
} : function1);
}
}

View File

@@ -0,0 +1,198 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
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.builtins.KotlinBuiltIns;
import kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltIns;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ModuleDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
import kotlin.reflect.jvm.internal.impl.storage.StorageKt;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
@SourceDebugExtension({"SMAP\nJvmBuiltIns.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JvmBuiltIns.kt\norg/jetbrains/kotlin/builtins/jvm/JvmBuiltIns\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,103:1\n1#2:104\n*E\n"})
/* loaded from: classes3.dex */
public final class JvmBuiltIns extends KotlinBuiltIns {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmBuiltIns.class), "customizer", "getCustomizer()Lorg/jetbrains/kotlin/builtins/jvm/JvmBuiltInsCustomizer;"))};
private final NotNullLazyValue customizer$delegate;
private final Kind kind;
private Function0<Settings> settingsComputation;
/* 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 Kind {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ Kind[] $VALUES;
public static final Kind FROM_DEPENDENCIES = new Kind("FROM_DEPENDENCIES", 0);
public static final Kind FROM_CLASS_LOADER = new Kind("FROM_CLASS_LOADER", 1);
public static final Kind FALLBACK = new Kind("FALLBACK", 2);
private static final /* synthetic */ Kind[] $values() {
return new Kind[]{FROM_DEPENDENCIES, FROM_CLASS_LOADER, FALLBACK};
}
static {
Kind[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private Kind(String str, int i) {
}
public static Kind valueOf(String str) {
return (Kind) Enum.valueOf(Kind.class, str);
}
public static Kind[] values() {
return (Kind[]) $VALUES.clone();
}
}
/* loaded from: classes3.dex */
public static final class Settings {
private final boolean isAdditionalBuiltInsFeatureSupported;
private final ModuleDescriptor ownerModuleDescriptor;
public Settings(ModuleDescriptor ownerModuleDescriptor, boolean z3) {
Intrinsics.checkNotNullParameter(ownerModuleDescriptor, "ownerModuleDescriptor");
this.ownerModuleDescriptor = ownerModuleDescriptor;
this.isAdditionalBuiltInsFeatureSupported = z3;
}
public final ModuleDescriptor getOwnerModuleDescriptor() {
return this.ownerModuleDescriptor;
}
public final boolean isAdditionalBuiltInsFeatureSupported() {
return this.isAdditionalBuiltInsFeatureSupported;
}
}
/* loaded from: classes3.dex */
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[Kind.values().length];
try {
iArr[Kind.FROM_DEPENDENCIES.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Kind.FROM_CLASS_LOADER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[Kind.FALLBACK.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
$EnumSwitchMapping$0 = iArr;
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public JvmBuiltIns(final StorageManager storageManager, Kind kind) {
super(storageManager);
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(kind, "kind");
this.kind = kind;
this.customizer$delegate = storageManager.createLazyValue(new Function0<JvmBuiltInsCustomizer>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltIns$customizer$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 JvmBuiltInsCustomizer invoke() {
ModuleDescriptorImpl builtInsModule = JvmBuiltIns.this.getBuiltInsModule();
Intrinsics.checkNotNullExpressionValue(builtInsModule, "getBuiltInsModule(...)");
StorageManager storageManager2 = storageManager;
final JvmBuiltIns jvmBuiltIns = JvmBuiltIns.this;
return new JvmBuiltInsCustomizer(builtInsModule, storageManager2, new Function0<JvmBuiltIns.Settings>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltIns$customizer$2.1
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final JvmBuiltIns.Settings invoke() {
Function0 function0;
function0 = JvmBuiltIns.this.settingsComputation;
if (function0 != null) {
JvmBuiltIns.Settings settings = (JvmBuiltIns.Settings) function0.invoke();
JvmBuiltIns.this.settingsComputation = null;
return settings;
}
throw new AssertionError("JvmBuiltins instance has not been initialized properly");
}
});
}
});
int i = WhenMappings.$EnumSwitchMapping$0[kind.ordinal()];
if (i == 2) {
createBuiltInsModule(false);
} else {
if (i != 3) {
return;
}
createBuiltInsModule(true);
}
}
@Override // kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns
public AdditionalClassPartsProvider getAdditionalClassPartsProvider() {
return getCustomizer();
}
public final JvmBuiltInsCustomizer getCustomizer() {
return (JvmBuiltInsCustomizer) StorageKt.getValue(this.customizer$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
}
@Override // kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns
public PlatformDependentDeclarationFilter getPlatformDependentDeclarationFilter() {
return getCustomizer();
}
public final void initialize(final ModuleDescriptor moduleDescriptor, final boolean z3) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "moduleDescriptor");
setPostponedSettingsComputation(new Function0<Settings>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltIns$initialize$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 JvmBuiltIns.Settings invoke() {
return new JvmBuiltIns.Settings(ModuleDescriptor.this, z3);
}
});
}
public final void setPostponedSettingsComputation(Function0<Settings> computation) {
Intrinsics.checkNotNullParameter(computation, "computation");
this.settingsComputation = computation;
}
@Override // kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns
public List<ClassDescriptorFactory> getClassDescriptorFactories() {
Iterable<ClassDescriptorFactory> classDescriptorFactories = super.getClassDescriptorFactories();
Intrinsics.checkNotNullExpressionValue(classDescriptorFactories, "getClassDescriptorFactories(...)");
StorageManager storageManager = getStorageManager();
Intrinsics.checkNotNullExpressionValue(storageManager, "getStorageManager(...)");
ModuleDescriptorImpl builtInsModule = getBuiltInsModule();
Intrinsics.checkNotNullExpressionValue(builtInsModule, "getBuiltInsModule(...)");
return CollectionsKt.plus(classDescriptorFactories, new JvmBuiltInClassDescriptorFactory(storageManager, builtInsModule, null, 4, null));
}
}

View File

@@ -0,0 +1,598 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import C.w;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.SetsKt;
import kotlin.enums.EnumEntries;
import kotlin.enums.EnumEntriesKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
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.builtins.jvm.JvmBuiltIns;
import kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer;
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.ClassKind;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ConstructorDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorUtilKt;
import kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities;
import kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.Modality;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
import kotlin.reflect.jvm.internal.impl.descriptors.ValueParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.AnnotationUtilKt;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilterKt;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.PackageFragmentDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.incremental.components.NoLookupLocation;
import kotlin.reflect.jvm.internal.impl.load.java.components.JavaResolverCache;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassDescriptor;
import kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors.LazyJavaClassMemberScope;
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureBuildingUtilsKt;
import kotlin.reflect.jvm.internal.impl.load.kotlin.MethodSignatureMappingKt;
import kotlin.reflect.jvm.internal.impl.load.kotlin.SignatureBuildingComponents;
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;
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedClassDescriptor;
import kotlin.reflect.jvm.internal.impl.storage.CacheWithNotNullValues;
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNotNull;
import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue;
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.LazyWrappedType;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
import kotlin.reflect.jvm.internal.impl.utils.DFS;
import kotlin.reflect.jvm.internal.impl.utils.SmartSet;
@SourceDebugExtension({"SMAP\nJvmBuiltInsCustomizer.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JvmBuiltInsCustomizer.kt\norg/jetbrains/kotlin/builtins/jvm/JvmBuiltInsCustomizer\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,375:1\n1747#2,3:376\n1603#2,9:379\n1855#2:388\n1856#2:390\n1612#2:391\n1549#2:392\n1620#2,3:393\n766#2:396\n857#2:397\n1747#2,3:398\n858#2:401\n766#2:402\n857#2:403\n2624#2,3:404\n858#2:407\n1549#2:408\n1620#2,3:409\n1747#2,3:412\n1603#2,9:415\n1855#2:424\n1856#2:426\n1612#2:427\n1#3:389\n1#3:425\n*S KotlinDebug\n*F\n+ 1 JvmBuiltInsCustomizer.kt\norg/jetbrains/kotlin/builtins/jvm/JvmBuiltInsCustomizer\n*L\n119#1:376,3\n135#1:379,9\n135#1:388\n135#1:390\n135#1:391\n194#1:392\n194#1:393,3\n208#1:396\n208#1:397\n213#1:398,3\n208#1:401\n316#1:402\n316#1:403\n318#1:404,3\n316#1:407\n325#1:408\n325#1:409,3\n352#1:412,3\n256#1:415,9\n256#1:424\n256#1:426\n256#1:427\n135#1:389\n256#1:425\n*E\n"})
/* loaded from: classes3.dex */
public final class JvmBuiltInsCustomizer implements AdditionalClassPartsProvider, PlatformDependentDeclarationFilter {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmBuiltInsCustomizer.class), "settings", "getSettings()Lorg/jetbrains/kotlin/builtins/jvm/JvmBuiltIns$Settings;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmBuiltInsCustomizer.class), "cloneableType", "getCloneableType()Lorg/jetbrains/kotlin/types/SimpleType;")), Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(JvmBuiltInsCustomizer.class), "notConsideredDeprecation", "getNotConsideredDeprecation()Lorg/jetbrains/kotlin/descriptors/annotations/Annotations;"))};
private final NotNullLazyValue cloneableType$delegate;
private final MemoizedFunctionToNotNull<Pair<String, String>, Annotations> deprecationForSomeOfTheListMethods;
private final JavaToKotlinClassMapper j2kClassMapper;
private final CacheWithNotNullValues<FqName, ClassDescriptor> javaAnalogueClassesWithCustomSupertypeCache;
private final KotlinType mockSerializableType;
private final ModuleDescriptor moduleDescriptor;
private final NotNullLazyValue notConsideredDeprecation$delegate;
private final NotNullLazyValue settings$delegate;
/* 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 JDKMemberStatus {
private static final /* synthetic */ EnumEntries $ENTRIES;
private static final /* synthetic */ JDKMemberStatus[] $VALUES;
public static final JDKMemberStatus HIDDEN = new JDKMemberStatus("HIDDEN", 0);
public static final JDKMemberStatus VISIBLE = new JDKMemberStatus("VISIBLE", 1);
public static final JDKMemberStatus DEPRECATED_LIST_METHODS = new JDKMemberStatus("DEPRECATED_LIST_METHODS", 2);
public static final JDKMemberStatus NOT_CONSIDERED = new JDKMemberStatus("NOT_CONSIDERED", 3);
public static final JDKMemberStatus DROP = new JDKMemberStatus("DROP", 4);
private static final /* synthetic */ JDKMemberStatus[] $values() {
return new JDKMemberStatus[]{HIDDEN, VISIBLE, DEPRECATED_LIST_METHODS, NOT_CONSIDERED, DROP};
}
static {
JDKMemberStatus[] $values = $values();
$VALUES = $values;
$ENTRIES = EnumEntriesKt.enumEntries($values);
}
private JDKMemberStatus(String str, int i) {
}
public static JDKMemberStatus valueOf(String str) {
return (JDKMemberStatus) Enum.valueOf(JDKMemberStatus.class, str);
}
public static JDKMemberStatus[] values() {
return (JDKMemberStatus[]) $VALUES.clone();
}
}
/* loaded from: classes3.dex */
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[JDKMemberStatus.values().length];
try {
iArr[JDKMemberStatus.HIDDEN.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[JDKMemberStatus.DEPRECATED_LIST_METHODS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[JDKMemberStatus.NOT_CONSIDERED.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[JDKMemberStatus.DROP.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
iArr[JDKMemberStatus.VISIBLE.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
$EnumSwitchMapping$0 = iArr;
}
}
public JvmBuiltInsCustomizer(ModuleDescriptor moduleDescriptor, final StorageManager storageManager, Function0<JvmBuiltIns.Settings> settingsComputation) {
Intrinsics.checkNotNullParameter(moduleDescriptor, "moduleDescriptor");
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(settingsComputation, "settingsComputation");
this.moduleDescriptor = moduleDescriptor;
this.j2kClassMapper = JavaToKotlinClassMapper.INSTANCE;
this.settings$delegate = storageManager.createLazyValue(settingsComputation);
this.mockSerializableType = createMockJavaIoSerializableType(storageManager);
this.cloneableType$delegate = storageManager.createLazyValue(new Function0<SimpleType>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$cloneableType$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() {
JvmBuiltIns.Settings settings;
JvmBuiltIns.Settings settings2;
settings = JvmBuiltInsCustomizer.this.getSettings();
ModuleDescriptor ownerModuleDescriptor = settings.getOwnerModuleDescriptor();
ClassId cloneable_class_id = JvmBuiltInClassDescriptorFactory.Companion.getCLONEABLE_CLASS_ID();
StorageManager storageManager2 = storageManager;
settings2 = JvmBuiltInsCustomizer.this.getSettings();
return FindClassInModuleKt.findNonGenericClassAcrossDependencies(ownerModuleDescriptor, cloneable_class_id, new NotFoundClasses(storageManager2, settings2.getOwnerModuleDescriptor())).getDefaultType();
}
});
this.javaAnalogueClassesWithCustomSupertypeCache = storageManager.createCacheWithNotNullValues();
this.notConsideredDeprecation$delegate = storageManager.createLazyValue(new Function0<Annotations>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$notConsideredDeprecation$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Annotations invoke() {
ModuleDescriptor moduleDescriptor2;
moduleDescriptor2 = JvmBuiltInsCustomizer.this.moduleDescriptor;
return Annotations.Companion.create(CollectionsKt.listOf(AnnotationUtilKt.createDeprecatedAnnotation$default(moduleDescriptor2.getBuiltIns(), "This member is not fully supported by Kotlin compiler, so it may be absent or have different signature in next major version", null, null, true, 6, null)));
}
});
this.deprecationForSomeOfTheListMethods = storageManager.createMemoizedFunction(new Function1<Pair<? extends String, ? extends String>, Annotations>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$deprecationForSomeOfTheListMethods$1
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Annotations invoke(Pair<? extends String, ? extends String> pair) {
return invoke2((Pair<String, String>) pair);
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final Annotations invoke2(Pair<String, String> pair) {
ModuleDescriptor moduleDescriptor2;
Intrinsics.checkNotNullParameter(pair, "<name for destructuring parameter 0>");
String component1 = pair.component1();
String component2 = pair.component2();
moduleDescriptor2 = JvmBuiltInsCustomizer.this.moduleDescriptor;
return Annotations.Companion.create(CollectionsKt.listOf(AnnotationUtilKt.createDeprecatedAnnotation$default(moduleDescriptor2.getBuiltIns(), "'" + component1 + "()' member of List is redundant in Kotlin and might be removed soon. Please use '" + component2 + "()' stdlib extension instead", w.n(component2, "()"), null, true, 4, null)));
}
});
}
private final SimpleFunctionDescriptor createCloneForArray(DeserializedClassDescriptor deserializedClassDescriptor, SimpleFunctionDescriptor simpleFunctionDescriptor) {
FunctionDescriptor.CopyBuilder<? extends SimpleFunctionDescriptor> newCopyBuilder = simpleFunctionDescriptor.newCopyBuilder();
newCopyBuilder.setOwner(deserializedClassDescriptor);
newCopyBuilder.setVisibility(DescriptorVisibilities.PUBLIC);
newCopyBuilder.setReturnType(deserializedClassDescriptor.getDefaultType());
newCopyBuilder.setDispatchReceiverParameter(deserializedClassDescriptor.getThisAsReceiverParameter());
SimpleFunctionDescriptor build = newCopyBuilder.build();
Intrinsics.checkNotNull(build);
return build;
}
private final KotlinType createMockJavaIoSerializableType(StorageManager storageManager) {
final ModuleDescriptor moduleDescriptor = this.moduleDescriptor;
final FqName fqName = new FqName("java.io");
ClassDescriptorImpl classDescriptorImpl = new ClassDescriptorImpl(new PackageFragmentDescriptorImpl(moduleDescriptor, fqName) { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$createMockJavaIoSerializableType$mockJavaIoPackageFragment$1
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentDescriptor
public MemberScope.Empty getMemberScope() {
return MemberScope.Empty.INSTANCE;
}
}, Name.identifier("Serializable"), Modality.ABSTRACT, ClassKind.INTERFACE, CollectionsKt.listOf(new LazyWrappedType(storageManager, new Function0<KotlinType>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$createMockJavaIoSerializableType$superTypes$1
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final KotlinType invoke() {
ModuleDescriptor moduleDescriptor2;
moduleDescriptor2 = JvmBuiltInsCustomizer.this.moduleDescriptor;
SimpleType anyType = moduleDescriptor2.getBuiltIns().getAnyType();
Intrinsics.checkNotNullExpressionValue(anyType, "getAnyType(...)");
return anyType;
}
})), SourceElement.NO_SOURCE, false, storageManager);
classDescriptorImpl.initialize(MemberScope.Empty.INSTANCE, SetsKt.emptySet(), null);
SimpleType defaultType = classDescriptorImpl.getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
return defaultType;
}
private final Collection<SimpleFunctionDescriptor> getAdditionalFunctions(ClassDescriptor classDescriptor, Function1<? super MemberScope, ? extends Collection<? extends SimpleFunctionDescriptor>> function1) {
int collectionSizeOrDefault;
final LazyJavaClassDescriptor javaAnalogue = getJavaAnalogue(classDescriptor);
if (javaAnalogue == null) {
return CollectionsKt.emptyList();
}
Collection<ClassDescriptor> mapPlatformClass = this.j2kClassMapper.mapPlatformClass(DescriptorUtilsKt.getFqNameSafe(javaAnalogue), FallbackBuiltIns.Companion.getInstance());
final ClassDescriptor classDescriptor2 = (ClassDescriptor) CollectionsKt.lastOrNull(mapPlatformClass);
if (classDescriptor2 == null) {
return CollectionsKt.emptyList();
}
SmartSet.Companion companion = SmartSet.Companion;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(mapPlatformClass, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = mapPlatformClass.iterator();
while (it.hasNext()) {
arrayList.add(DescriptorUtilsKt.getFqNameSafe((ClassDescriptor) it.next()));
}
SmartSet create = companion.create(arrayList);
boolean isMutable = this.j2kClassMapper.isMutable(classDescriptor);
MemberScope unsubstitutedMemberScope = this.javaAnalogueClassesWithCustomSupertypeCache.computeIfAbsent(DescriptorUtilsKt.getFqNameSafe(javaAnalogue), new Function0<ClassDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$getAdditionalFunctions$fakeJavaClassDescriptor$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 ClassDescriptor invoke() {
LazyJavaClassDescriptor lazyJavaClassDescriptor = LazyJavaClassDescriptor.this;
JavaResolverCache EMPTY = JavaResolverCache.EMPTY;
Intrinsics.checkNotNullExpressionValue(EMPTY, "EMPTY");
return lazyJavaClassDescriptor.copy$descriptors_jvm(EMPTY, classDescriptor2);
}
}).getUnsubstitutedMemberScope();
Intrinsics.checkNotNullExpressionValue(unsubstitutedMemberScope, "getUnsubstitutedMemberScope(...)");
Collection<? extends SimpleFunctionDescriptor> invoke = function1.invoke(unsubstitutedMemberScope);
ArrayList arrayList2 = new ArrayList();
for (Object obj : invoke) {
SimpleFunctionDescriptor simpleFunctionDescriptor = (SimpleFunctionDescriptor) obj;
if (simpleFunctionDescriptor.getKind() == CallableMemberDescriptor.Kind.DECLARATION && simpleFunctionDescriptor.getVisibility().isPublicAPI() && !KotlinBuiltIns.isDeprecated(simpleFunctionDescriptor)) {
Collection<? extends FunctionDescriptor> overriddenDescriptors = simpleFunctionDescriptor.getOverriddenDescriptors();
Intrinsics.checkNotNullExpressionValue(overriddenDescriptors, "getOverriddenDescriptors(...)");
Collection<? extends FunctionDescriptor> collection = overriddenDescriptors;
if (!(collection instanceof Collection) || !collection.isEmpty()) {
Iterator<T> it2 = collection.iterator();
while (it2.hasNext()) {
DeclarationDescriptor containingDeclaration = ((FunctionDescriptor) it2.next()).getContainingDeclaration();
Intrinsics.checkNotNullExpressionValue(containingDeclaration, "getContainingDeclaration(...)");
if (create.contains(DescriptorUtilsKt.getFqNameSafe(containingDeclaration))) {
break;
}
}
}
if (!isMutabilityViolation(simpleFunctionDescriptor, isMutable)) {
arrayList2.add(obj);
}
}
}
return arrayList2;
}
private final SimpleType getCloneableType() {
return (SimpleType) StorageKt.getValue(this.cloneableType$delegate, this, (KProperty<?>) $$delegatedProperties[1]);
}
private static final boolean getConstructors$isEffectivelyTheSameAs(ConstructorDescriptor constructorDescriptor, TypeSubstitutor typeSubstitutor, ConstructorDescriptor constructorDescriptor2) {
return OverridingUtil.getBothWaysOverridability(constructorDescriptor, constructorDescriptor2.substitute(typeSubstitutor)) == OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE;
}
private final LazyJavaClassDescriptor getJavaAnalogue(ClassDescriptor classDescriptor) {
ClassId mapKotlinToJava;
FqName asSingleFqName;
if (KotlinBuiltIns.isAny(classDescriptor) || !KotlinBuiltIns.isUnderKotlinPackage(classDescriptor)) {
return null;
}
FqNameUnsafe fqNameUnsafe = DescriptorUtilsKt.getFqNameUnsafe(classDescriptor);
if (fqNameUnsafe.isSafe() && (mapKotlinToJava = JavaToKotlinClassMap.INSTANCE.mapKotlinToJava(fqNameUnsafe)) != null && (asSingleFqName = mapKotlinToJava.asSingleFqName()) != null) {
ClassDescriptor resolveClassByFqName = DescriptorUtilKt.resolveClassByFqName(getSettings().getOwnerModuleDescriptor(), asSingleFqName, NoLookupLocation.FROM_BUILTINS);
if (resolveClassByFqName instanceof LazyJavaClassDescriptor) {
return (LazyJavaClassDescriptor) resolveClassByFqName;
}
}
return null;
}
private final JDKMemberStatus getJdkMethodStatus(FunctionDescriptor functionDescriptor) {
DeclarationDescriptor containingDeclaration = functionDescriptor.getContainingDeclaration();
Intrinsics.checkNotNull(containingDeclaration, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
final String computeJvmDescriptor$default = MethodSignatureMappingKt.computeJvmDescriptor$default(functionDescriptor, false, false, 3, null);
final Ref.ObjectRef objectRef = new Ref.ObjectRef();
Object dfs = DFS.dfs(CollectionsKt.listOf((ClassDescriptor) containingDeclaration), new DFS.Neighbors(this) { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$$Lambda$1
private final JvmBuiltInsCustomizer arg$0;
{
this.arg$0 = this;
}
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.Neighbors
public Iterable getNeighbors(Object obj) {
Iterable jdkMethodStatus$lambda$9;
jdkMethodStatus$lambda$9 = JvmBuiltInsCustomizer.getJdkMethodStatus$lambda$9(this.arg$0, (ClassDescriptor) obj);
return jdkMethodStatus$lambda$9;
}
}, new DFS.AbstractNodeHandler<ClassDescriptor, JDKMemberStatus>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$getJdkMethodStatus$2
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$JDKMemberStatus, T] */
/* JADX WARN: Type inference failed for: r0v5, types: [kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$JDKMemberStatus, T] */
/* JADX WARN: Type inference failed for: r0v6, types: [kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$JDKMemberStatus, T] */
/* JADX WARN: Type inference failed for: r0v7, types: [kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$JDKMemberStatus, T] */
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.AbstractNodeHandler, kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
public boolean beforeChildren(ClassDescriptor javaClassDescriptor) {
Intrinsics.checkNotNullParameter(javaClassDescriptor, "javaClassDescriptor");
String signature = MethodSignatureBuildingUtilsKt.signature(SignatureBuildingComponents.INSTANCE, javaClassDescriptor, computeJvmDescriptor$default);
JvmBuiltInsSignatures jvmBuiltInsSignatures = JvmBuiltInsSignatures.INSTANCE;
if (jvmBuiltInsSignatures.getHIDDEN_METHOD_SIGNATURES().contains(signature)) {
objectRef.element = JvmBuiltInsCustomizer.JDKMemberStatus.HIDDEN;
} else if (jvmBuiltInsSignatures.getVISIBLE_METHOD_SIGNATURES().contains(signature)) {
objectRef.element = JvmBuiltInsCustomizer.JDKMemberStatus.VISIBLE;
} else if (jvmBuiltInsSignatures.getDEPRECATED_LIST_METHODS().contains(signature)) {
objectRef.element = JvmBuiltInsCustomizer.JDKMemberStatus.DEPRECATED_LIST_METHODS;
} else if (jvmBuiltInsSignatures.getDROP_LIST_METHOD_SIGNATURES().contains(signature)) {
objectRef.element = JvmBuiltInsCustomizer.JDKMemberStatus.DROP;
}
return objectRef.element == null;
}
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.NodeHandler
public JvmBuiltInsCustomizer.JDKMemberStatus result() {
JvmBuiltInsCustomizer.JDKMemberStatus jDKMemberStatus = objectRef.element;
return jDKMemberStatus == null ? JvmBuiltInsCustomizer.JDKMemberStatus.NOT_CONSIDERED : jDKMemberStatus;
}
});
Intrinsics.checkNotNullExpressionValue(dfs, "dfs(...)");
return (JDKMemberStatus) dfs;
}
/* JADX INFO: Access modifiers changed from: private */
public static final Iterable getJdkMethodStatus$lambda$9(JvmBuiltInsCustomizer this$0, ClassDescriptor classDescriptor) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Collection<KotlinType> mo1395getSupertypes = classDescriptor.getTypeConstructor().mo1395getSupertypes();
Intrinsics.checkNotNullExpressionValue(mo1395getSupertypes, "getSupertypes(...)");
ArrayList arrayList = new ArrayList();
Iterator<T> it = mo1395getSupertypes.iterator();
while (it.hasNext()) {
ClassifierDescriptor mo1394getDeclarationDescriptor = ((KotlinType) it.next()).getConstructor().mo1394getDeclarationDescriptor();
LazyJavaClassDescriptor lazyJavaClassDescriptor = null;
ClassifierDescriptor original = mo1394getDeclarationDescriptor != null ? mo1394getDeclarationDescriptor.getOriginal() : null;
ClassDescriptor classDescriptor2 = original instanceof ClassDescriptor ? (ClassDescriptor) original : null;
if (classDescriptor2 != null && (lazyJavaClassDescriptor = this$0.getJavaAnalogue(classDescriptor2)) == null) {
lazyJavaClassDescriptor = classDescriptor2;
}
if (lazyJavaClassDescriptor != null) {
arrayList.add(lazyJavaClassDescriptor);
}
}
return arrayList;
}
private final Annotations getNotConsideredDeprecation() {
return (Annotations) StorageKt.getValue(this.notConsideredDeprecation$delegate, this, (KProperty<?>) $$delegatedProperties[2]);
}
/* JADX INFO: Access modifiers changed from: private */
public final JvmBuiltIns.Settings getSettings() {
return (JvmBuiltIns.Settings) StorageKt.getValue(this.settings$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
}
private final boolean isMutabilityViolation(SimpleFunctionDescriptor simpleFunctionDescriptor, boolean z3) {
DeclarationDescriptor containingDeclaration = simpleFunctionDescriptor.getContainingDeclaration();
Intrinsics.checkNotNull(containingDeclaration, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
String computeJvmDescriptor$default = MethodSignatureMappingKt.computeJvmDescriptor$default(simpleFunctionDescriptor, false, false, 3, null);
if (z3 ^ JvmBuiltInsSignatures.INSTANCE.getMUTABLE_METHOD_SIGNATURES().contains(MethodSignatureBuildingUtilsKt.signature(SignatureBuildingComponents.INSTANCE, (ClassDescriptor) containingDeclaration, computeJvmDescriptor$default))) {
return true;
}
Boolean ifAny = DFS.ifAny(CollectionsKt.listOf(simpleFunctionDescriptor), new DFS.Neighbors() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$$Lambda$0
@Override // kotlin.reflect.jvm.internal.impl.utils.DFS.Neighbors
public Iterable getNeighbors(Object obj) {
Iterable isMutabilityViolation$lambda$7;
isMutabilityViolation$lambda$7 = JvmBuiltInsCustomizer.isMutabilityViolation$lambda$7((CallableMemberDescriptor) obj);
return isMutabilityViolation$lambda$7;
}
}, new Function1<CallableMemberDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer$isMutabilityViolation$2
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public final Boolean invoke(CallableMemberDescriptor callableMemberDescriptor) {
boolean z4;
JavaToKotlinClassMapper javaToKotlinClassMapper;
if (callableMemberDescriptor.getKind() == CallableMemberDescriptor.Kind.DECLARATION) {
javaToKotlinClassMapper = JvmBuiltInsCustomizer.this.j2kClassMapper;
DeclarationDescriptor containingDeclaration2 = callableMemberDescriptor.getContainingDeclaration();
Intrinsics.checkNotNull(containingDeclaration2, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassDescriptor");
if (javaToKotlinClassMapper.isMutable((ClassDescriptor) containingDeclaration2)) {
z4 = true;
return Boolean.valueOf(z4);
}
}
z4 = false;
return Boolean.valueOf(z4);
}
});
Intrinsics.checkNotNullExpressionValue(ifAny, "ifAny(...)");
return ifAny.booleanValue();
}
/* JADX INFO: Access modifiers changed from: private */
public static final Iterable isMutabilityViolation$lambda$7(CallableMemberDescriptor callableMemberDescriptor) {
return callableMemberDescriptor.getOriginal().getOverriddenDescriptors();
}
private final boolean isTrivialCopyConstructorFor(ConstructorDescriptor constructorDescriptor, ClassDescriptor classDescriptor) {
if (constructorDescriptor.getValueParameters().size() != 1) {
return false;
}
List<ValueParameterDescriptor> valueParameters = constructorDescriptor.getValueParameters();
Intrinsics.checkNotNullExpressionValue(valueParameters, "getValueParameters(...)");
ClassifierDescriptor mo1394getDeclarationDescriptor = ((ValueParameterDescriptor) CollectionsKt.single((List) valueParameters)).getType().getConstructor().mo1394getDeclarationDescriptor();
return Intrinsics.areEqual(mo1394getDeclarationDescriptor != null ? DescriptorUtilsKt.getFqNameUnsafe(mo1394getDeclarationDescriptor) : null, DescriptorUtilsKt.getFqNameUnsafe(classDescriptor));
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider
public Collection<ClassConstructorDescriptor> getConstructors(ClassDescriptor classDescriptor) {
ClassDescriptor mapJavaToKotlin$default;
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
if (classDescriptor.getKind() != ClassKind.CLASS || !getSettings().isAdditionalBuiltInsFeatureSupported()) {
return CollectionsKt.emptyList();
}
LazyJavaClassDescriptor javaAnalogue = getJavaAnalogue(classDescriptor);
if (javaAnalogue != null && (mapJavaToKotlin$default = JavaToKotlinClassMapper.mapJavaToKotlin$default(this.j2kClassMapper, DescriptorUtilsKt.getFqNameSafe(javaAnalogue), FallbackBuiltIns.Companion.getInstance(), null, 4, null)) != null) {
TypeSubstitutor buildSubstitutor = MappingUtilKt.createMappedTypeParametersSubstitution(mapJavaToKotlin$default, javaAnalogue).buildSubstitutor();
List<ClassConstructorDescriptor> constructors = javaAnalogue.getConstructors();
ArrayList arrayList = new ArrayList();
for (Object obj : constructors) {
ClassConstructorDescriptor classConstructorDescriptor = (ClassConstructorDescriptor) obj;
if (classConstructorDescriptor.getVisibility().isPublicAPI()) {
Collection<ClassConstructorDescriptor> constructors2 = mapJavaToKotlin$default.getConstructors();
Intrinsics.checkNotNullExpressionValue(constructors2, "getConstructors(...)");
Collection<ClassConstructorDescriptor> collection = constructors2;
if (!(collection instanceof Collection) || !collection.isEmpty()) {
for (ClassConstructorDescriptor classConstructorDescriptor2 : collection) {
Intrinsics.checkNotNull(classConstructorDescriptor2);
if (getConstructors$isEffectivelyTheSameAs(classConstructorDescriptor2, buildSubstitutor, classConstructorDescriptor)) {
break;
}
}
}
if (!isTrivialCopyConstructorFor(classConstructorDescriptor, classDescriptor) && !KotlinBuiltIns.isDeprecated(classConstructorDescriptor) && !JvmBuiltInsSignatures.INSTANCE.getHIDDEN_CONSTRUCTOR_SIGNATURES().contains(MethodSignatureBuildingUtilsKt.signature(SignatureBuildingComponents.INSTANCE, javaAnalogue, MethodSignatureMappingKt.computeJvmDescriptor$default(classConstructorDescriptor, false, false, 3, null)))) {
arrayList.add(obj);
}
}
}
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault);
Iterator it = arrayList.iterator();
while (it.hasNext()) {
ClassConstructorDescriptor classConstructorDescriptor3 = (ClassConstructorDescriptor) it.next();
FunctionDescriptor.CopyBuilder<? extends FunctionDescriptor> newCopyBuilder = classConstructorDescriptor3.newCopyBuilder();
newCopyBuilder.setOwner(classDescriptor);
newCopyBuilder.setReturnType(classDescriptor.getDefaultType());
newCopyBuilder.setPreserveSourceElement();
newCopyBuilder.setSubstitution(buildSubstitutor.getSubstitution());
if (!JvmBuiltInsSignatures.INSTANCE.getVISIBLE_CONSTRUCTOR_SIGNATURES().contains(MethodSignatureBuildingUtilsKt.signature(SignatureBuildingComponents.INSTANCE, javaAnalogue, MethodSignatureMappingKt.computeJvmDescriptor$default(classConstructorDescriptor3, false, false, 3, null)))) {
newCopyBuilder.setAdditionalAnnotations(getNotConsideredDeprecation());
}
FunctionDescriptor build = newCopyBuilder.build();
Intrinsics.checkNotNull(build, "null cannot be cast to non-null type org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor");
arrayList2.add((ClassConstructorDescriptor) build);
}
return arrayList2;
}
return CollectionsKt.emptyList();
}
/* JADX WARN: Code restructure failed: missing block: B:38:0x010a, code lost:
if (r3 != 4) goto L52;
*/
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.util.Collection<kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor> getFunctions(final kotlin.reflect.jvm.internal.impl.name.Name r7, kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor r8) {
/*
Method dump skipped, instructions count: 407
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.builtins.jvm.JvmBuiltInsCustomizer.getFunctions(kotlin.reflect.jvm.internal.impl.name.Name, kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor):java.util.Collection");
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider
public Collection<KotlinType> getSupertypes(ClassDescriptor classDescriptor) {
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
FqNameUnsafe fqNameUnsafe = DescriptorUtilsKt.getFqNameUnsafe(classDescriptor);
JvmBuiltInsSignatures jvmBuiltInsSignatures = JvmBuiltInsSignatures.INSTANCE;
if (!jvmBuiltInsSignatures.isArrayOrPrimitiveArray(fqNameUnsafe)) {
return jvmBuiltInsSignatures.isSerializableInJava(fqNameUnsafe) ? CollectionsKt.listOf(this.mockSerializableType) : CollectionsKt.emptyList();
}
SimpleType cloneableType = getCloneableType();
Intrinsics.checkNotNullExpressionValue(cloneableType, "<get-cloneableType>(...)");
return CollectionsKt.listOf((Object[]) new KotlinType[]{cloneableType, this.mockSerializableType});
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter
public boolean isFunctionAvailable(ClassDescriptor classDescriptor, SimpleFunctionDescriptor functionDescriptor) {
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
Intrinsics.checkNotNullParameter(functionDescriptor, "functionDescriptor");
LazyJavaClassDescriptor javaAnalogue = getJavaAnalogue(classDescriptor);
if (javaAnalogue == null || !functionDescriptor.getAnnotations().hasAnnotation(PlatformDependentDeclarationFilterKt.getPLATFORM_DEPENDENT_ANNOTATION_FQ_NAME())) {
return true;
}
if (!getSettings().isAdditionalBuiltInsFeatureSupported()) {
return false;
}
String computeJvmDescriptor$default = MethodSignatureMappingKt.computeJvmDescriptor$default(functionDescriptor, false, false, 3, null);
LazyJavaClassMemberScope unsubstitutedMemberScope = javaAnalogue.getUnsubstitutedMemberScope();
Name name = functionDescriptor.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
Collection<SimpleFunctionDescriptor> contributedFunctions = unsubstitutedMemberScope.getContributedFunctions(name, NoLookupLocation.FROM_BUILTINS);
if ((contributedFunctions instanceof Collection) && contributedFunctions.isEmpty()) {
return false;
}
Iterator<T> it = contributedFunctions.iterator();
while (it.hasNext()) {
if (Intrinsics.areEqual(MethodSignatureMappingKt.computeJvmDescriptor$default((SimpleFunctionDescriptor) it.next(), false, false, 3, null), computeJvmDescriptor$default)) {
return true;
}
}
return false;
}
@Override // kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider
public Set<Name> getFunctionsNames(ClassDescriptor classDescriptor) {
LazyJavaClassMemberScope unsubstitutedMemberScope;
Set<Name> functionNames;
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
if (!getSettings().isAdditionalBuiltInsFeatureSupported()) {
return SetsKt.emptySet();
}
LazyJavaClassDescriptor javaAnalogue = getJavaAnalogue(classDescriptor);
return (javaAnalogue == null || (unsubstitutedMemberScope = javaAnalogue.getUnsubstitutedMemberScope()) == null || (functionNames = unsubstitutedMemberScope.getFunctionNames()) == null) ? SetsKt.emptySet() : functionNames;
}
}

View File

@@ -0,0 +1,19 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.name.Name;
/* loaded from: classes3.dex */
public final class JvmBuiltInsCustomizerKt {
private static final Name GET_FIRST_LIST_NAME;
private static final Name GET_LAST_LIST_NAME;
static {
Name identifier = Name.identifier("getFirst");
Intrinsics.checkNotNullExpressionValue(identifier, "identifier(...)");
GET_FIRST_LIST_NAME = identifier;
Name identifier2 = Name.identifier("getLast");
Intrinsics.checkNotNullExpressionValue(identifier2, "identifier(...)");
GET_LAST_LIST_NAME = identifier2;
}
}

View File

@@ -0,0 +1,77 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.io.InputStream;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.jvm.internal.impl.builtins.functions.BuiltInFictitiousFunctionClassFactory;
import kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.AdditionalClassPartsProvider;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.ClassDescriptorFactory;
import kotlin.reflect.jvm.internal.impl.descriptors.deserialization.PlatformDependentDeclarationFilter;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupTracker;
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder;
import kotlin.reflect.jvm.internal.impl.name.FqName;
import kotlin.reflect.jvm.internal.impl.resolve.sam.SamConversionResolver;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.AbstractDeserializedPackageFragmentProvider;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.AnnotationAndConstantLoaderImpl;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ContractDeserializer;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationComponents;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializationConfiguration;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializedClassDataFinder;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.DeserializedPackageFragment;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.ErrorReporter;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.FlexibleTypeDeserializer;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.JvmEnumEntriesDeserializationSupport;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.LocalClassifierTypeSettings;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInSerializerProtocol;
import kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsPackageFragmentImpl;
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
import kotlin.reflect.jvm.internal.impl.types.checker.NewKotlinTypeChecker;
/* loaded from: classes3.dex */
public final class JvmBuiltInsPackageFragmentProvider extends AbstractDeserializedPackageFragmentProvider {
public static final Companion Companion = new Companion(null);
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public JvmBuiltInsPackageFragmentProvider(StorageManager storageManager, KotlinClassFinder finder, ModuleDescriptor moduleDescriptor, NotFoundClasses notFoundClasses, AdditionalClassPartsProvider additionalClassPartsProvider, PlatformDependentDeclarationFilter platformDependentDeclarationFilter, DeserializationConfiguration deserializationConfiguration, NewKotlinTypeChecker kotlinTypeChecker, SamConversionResolver samConversionResolver) {
super(storageManager, finder, moduleDescriptor);
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(finder, "finder");
Intrinsics.checkNotNullParameter(moduleDescriptor, "moduleDescriptor");
Intrinsics.checkNotNullParameter(notFoundClasses, "notFoundClasses");
Intrinsics.checkNotNullParameter(additionalClassPartsProvider, "additionalClassPartsProvider");
Intrinsics.checkNotNullParameter(platformDependentDeclarationFilter, "platformDependentDeclarationFilter");
Intrinsics.checkNotNullParameter(deserializationConfiguration, "deserializationConfiguration");
Intrinsics.checkNotNullParameter(kotlinTypeChecker, "kotlinTypeChecker");
Intrinsics.checkNotNullParameter(samConversionResolver, "samConversionResolver");
DeserializedClassDataFinder deserializedClassDataFinder = new DeserializedClassDataFinder(this);
BuiltInSerializerProtocol builtInSerializerProtocol = BuiltInSerializerProtocol.INSTANCE;
AnnotationAndConstantLoaderImpl annotationAndConstantLoaderImpl = new AnnotationAndConstantLoaderImpl(moduleDescriptor, notFoundClasses, builtInSerializerProtocol);
LocalClassifierTypeSettings.Default r7 = LocalClassifierTypeSettings.Default.INSTANCE;
ErrorReporter DO_NOTHING = ErrorReporter.DO_NOTHING;
Intrinsics.checkNotNullExpressionValue(DO_NOTHING, "DO_NOTHING");
setComponents(new DeserializationComponents(storageManager, moduleDescriptor, deserializationConfiguration, deserializedClassDataFinder, annotationAndConstantLoaderImpl, this, r7, DO_NOTHING, LookupTracker.DO_NOTHING.INSTANCE, FlexibleTypeDeserializer.ThrowException.INSTANCE, CollectionsKt.listOf((Object[]) new ClassDescriptorFactory[]{new BuiltInFictitiousFunctionClassFactory(storageManager, moduleDescriptor), new JvmBuiltInClassDescriptorFactory(storageManager, moduleDescriptor, null, 4, null)}), notFoundClasses, ContractDeserializer.Companion.getDEFAULT(), additionalClassPartsProvider, platformDependentDeclarationFilter, builtInSerializerProtocol.getExtensionRegistry(), kotlinTypeChecker, samConversionResolver, null, JvmEnumEntriesDeserializationSupport.INSTANCE, 262144, null));
}
@Override // kotlin.reflect.jvm.internal.impl.serialization.deserialization.AbstractDeserializedPackageFragmentProvider
public DeserializedPackageFragment findPackage(FqName fqName) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
InputStream findBuiltInsData = getFinder().findBuiltInsData(fqName);
if (findBuiltInsData != null) {
return BuiltInsPackageFragmentImpl.Companion.create(fqName, getStorageManager(), getModuleDescriptor(), findBuiltInsData, false);
}
return null;
}
}

View File

@@ -0,0 +1,129 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.collections.SetsKt;
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.kotlin.SignatureBuildingComponents;
import kotlin.reflect.jvm.internal.impl.name.ClassId;
import kotlin.reflect.jvm.internal.impl.name.FqNameUnsafe;
import kotlin.reflect.jvm.internal.impl.resolve.jvm.JvmPrimitiveType;
@SourceDebugExtension({"SMAP\nJvmBuiltInsSignatures.kt\nKotlin\n*S Kotlin\n*F\n+ 1 JvmBuiltInsSignatures.kt\norg/jetbrains/kotlin/builtins/jvm/JvmBuiltInsSignatures\n+ 2 SignatureBuildingComponents.kt\norg/jetbrains/kotlin/load/kotlin/SignatureBuildingComponentsKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,204:1\n13#2:205\n13#2:211\n13#2:217\n13#2:218\n13#2:219\n13#2:220\n13#2:221\n13#2:222\n1446#3,5:206\n1446#3,5:212\n*S KotlinDebug\n*F\n+ 1 JvmBuiltInsSignatures.kt\norg/jetbrains/kotlin/builtins/jvm/JvmBuiltInsSignatures\n*L\n64#1:205\n177#1:211\n23#1:217\n71#1:218\n80#1:219\n136#1:220\n155#1:221\n172#1:222\n65#1:206,5\n181#1:212,5\n*E\n"})
/* loaded from: classes3.dex */
public final class JvmBuiltInsSignatures {
private static final Set<String> DEPRECATED_LIST_METHODS;
private static final Set<String> DROP_LIST_METHOD_SIGNATURES;
private static final Set<String> HIDDEN_CONSTRUCTOR_SIGNATURES;
private static final Set<String> HIDDEN_METHOD_SIGNATURES;
public static final JvmBuiltInsSignatures INSTANCE;
private static final Set<String> MUTABLE_METHOD_SIGNATURES;
private static final Set<String> VISIBLE_CONSTRUCTOR_SIGNATURES;
private static final Set<String> VISIBLE_METHOD_SIGNATURES;
static {
JvmBuiltInsSignatures jvmBuiltInsSignatures = new JvmBuiltInsSignatures();
INSTANCE = jvmBuiltInsSignatures;
SignatureBuildingComponents signatureBuildingComponents = SignatureBuildingComponents.INSTANCE;
DROP_LIST_METHOD_SIGNATURES = SetsKt.plus(signatureBuildingComponents.inJavaUtil("Collection", "toArray()[Ljava/lang/Object;", "toArray([Ljava/lang/Object;)[Ljava/lang/Object;"), "java/lang/annotation/Annotation.annotationType()Ljava/lang/Class;");
HIDDEN_METHOD_SIGNATURES = SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus((Set) jvmBuiltInsSignatures.buildPrimitiveValueMethodsSet(), (Iterable) signatureBuildingComponents.inJavaUtil("List", "sort(Ljava/util/Comparator;)V", "reversed()Ljava/util/List;")), (Iterable) signatureBuildingComponents.inJavaLang("String", "codePointAt(I)I", "codePointBefore(I)I", "codePointCount(II)I", "compareToIgnoreCase(Ljava/lang/String;)I", "concat(Ljava/lang/String;)Ljava/lang/String;", "contains(Ljava/lang/CharSequence;)Z", "contentEquals(Ljava/lang/CharSequence;)Z", "contentEquals(Ljava/lang/StringBuffer;)Z", "endsWith(Ljava/lang/String;)Z", "equalsIgnoreCase(Ljava/lang/String;)Z", "getBytes()[B", "getBytes(II[BI)V", "getBytes(Ljava/lang/String;)[B", "getBytes(Ljava/nio/charset/Charset;)[B", "getChars(II[CI)V", "indexOf(I)I", "indexOf(II)I", "indexOf(Ljava/lang/String;)I", "indexOf(Ljava/lang/String;I)I", "intern()Ljava/lang/String;", "isEmpty()Z", "lastIndexOf(I)I", "lastIndexOf(II)I", "lastIndexOf(Ljava/lang/String;)I", "lastIndexOf(Ljava/lang/String;I)I", "matches(Ljava/lang/String;)Z", "offsetByCodePoints(II)I", "regionMatches(ILjava/lang/String;II)Z", "regionMatches(ZILjava/lang/String;II)Z", "replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "replace(CC)Ljava/lang/String;", "replaceFirst(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;", "split(Ljava/lang/String;I)[Ljava/lang/String;", "split(Ljava/lang/String;)[Ljava/lang/String;", "startsWith(Ljava/lang/String;I)Z", "startsWith(Ljava/lang/String;)Z", "substring(II)Ljava/lang/String;", "substring(I)Ljava/lang/String;", "toCharArray()[C", "toLowerCase()Ljava/lang/String;", "toLowerCase(Ljava/util/Locale;)Ljava/lang/String;", "toUpperCase()Ljava/lang/String;", "toUpperCase(Ljava/util/Locale;)Ljava/lang/String;", "trim()Ljava/lang/String;", "isBlank()Z", "lines()Ljava/util/stream/Stream;", "repeat(I)Ljava/lang/String;")), (Iterable) signatureBuildingComponents.inJavaLang("Double", "isInfinite()Z", "isNaN()Z")), (Iterable) signatureBuildingComponents.inJavaLang("Float", "isInfinite()Z", "isNaN()Z")), (Iterable) signatureBuildingComponents.inJavaLang("Enum", "getDeclaringClass()Ljava/lang/Class;", "finalize()V")), (Iterable) signatureBuildingComponents.inJavaLang("CharSequence", "isEmpty()Z"));
DEPRECATED_LIST_METHODS = signatureBuildingComponents.inJavaUtil("List", "getFirst()Ljava/lang/Object;", "getLast()Ljava/lang/Object;");
VISIBLE_METHOD_SIGNATURES = SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus(SetsKt.plus((Set) signatureBuildingComponents.inJavaLang("CharSequence", "codePoints()Ljava/util/stream/IntStream;", "chars()Ljava/util/stream/IntStream;"), (Iterable) signatureBuildingComponents.inJavaUtil("Iterator", "forEachRemaining(Ljava/util/function/Consumer;)V")), (Iterable) signatureBuildingComponents.inJavaLang("Iterable", "forEach(Ljava/util/function/Consumer;)V", "spliterator()Ljava/util/Spliterator;")), (Iterable) signatureBuildingComponents.inJavaLang("Throwable", "setStackTrace([Ljava/lang/StackTraceElement;)V", "fillInStackTrace()Ljava/lang/Throwable;", "getLocalizedMessage()Ljava/lang/String;", "printStackTrace()V", "printStackTrace(Ljava/io/PrintStream;)V", "printStackTrace(Ljava/io/PrintWriter;)V", "getStackTrace()[Ljava/lang/StackTraceElement;", "initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;", "getSuppressed()[Ljava/lang/Throwable;", "addSuppressed(Ljava/lang/Throwable;)V")), (Iterable) signatureBuildingComponents.inJavaUtil("Collection", "spliterator()Ljava/util/Spliterator;", "parallelStream()Ljava/util/stream/Stream;", "stream()Ljava/util/stream/Stream;", "removeIf(Ljava/util/function/Predicate;)Z")), (Iterable) signatureBuildingComponents.inJavaUtil("List", "replaceAll(Ljava/util/function/UnaryOperator;)V", "addFirst(Ljava/lang/Object;)V", "addLast(Ljava/lang/Object;)V", "removeFirst()Ljava/lang/Object;", "removeLast()Ljava/lang/Object;")), (Iterable) signatureBuildingComponents.inJavaUtil("Map", "getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "forEach(Ljava/util/function/BiConsumer;)V", "replaceAll(Ljava/util/function/BiFunction;)V", "merge(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "computeIfPresent(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z", "replace(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "computeIfAbsent(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;", "compute(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;"));
MUTABLE_METHOD_SIGNATURES = SetsKt.plus(SetsKt.plus((Set) signatureBuildingComponents.inJavaUtil("Collection", "removeIf(Ljava/util/function/Predicate;)Z"), (Iterable) signatureBuildingComponents.inJavaUtil("List", "replaceAll(Ljava/util/function/UnaryOperator;)V", "sort(Ljava/util/Comparator;)V")), (Iterable) signatureBuildingComponents.inJavaUtil("Map", "computeIfAbsent(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;", "computeIfPresent(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "compute(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "merge(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", "putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "remove(Ljava/lang/Object;Ljava/lang/Object;)Z", "replaceAll(Ljava/util/function/BiFunction;)V", "replace(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "replace(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z"));
Set<String> buildPrimitiveStringConstructorsSet = jvmBuiltInsSignatures.buildPrimitiveStringConstructorsSet();
String[] constructors = signatureBuildingComponents.constructors("D");
Set plus = SetsKt.plus((Set) buildPrimitiveStringConstructorsSet, (Iterable) signatureBuildingComponents.inJavaLang("Float", (String[]) Arrays.copyOf(constructors, constructors.length)));
String[] constructors2 = signatureBuildingComponents.constructors("[C", "[CII", "[III", "[BIILjava/lang/String;", "[BIILjava/nio/charset/Charset;", "[BLjava/lang/String;", "[BLjava/nio/charset/Charset;", "[BII", "[B", "Ljava/lang/StringBuffer;", "Ljava/lang/StringBuilder;");
HIDDEN_CONSTRUCTOR_SIGNATURES = SetsKt.plus(plus, (Iterable) signatureBuildingComponents.inJavaLang("String", (String[]) Arrays.copyOf(constructors2, constructors2.length)));
String[] constructors3 = signatureBuildingComponents.constructors("Ljava/lang/String;Ljava/lang/Throwable;ZZ");
VISIBLE_CONSTRUCTOR_SIGNATURES = signatureBuildingComponents.inJavaLang("Throwable", (String[]) Arrays.copyOf(constructors3, constructors3.length));
}
private JvmBuiltInsSignatures() {
}
private final Set<String> buildPrimitiveStringConstructorsSet() {
SignatureBuildingComponents signatureBuildingComponents = SignatureBuildingComponents.INSTANCE;
JvmPrimitiveType jvmPrimitiveType = JvmPrimitiveType.BOOLEAN;
JvmPrimitiveType jvmPrimitiveType2 = JvmPrimitiveType.BYTE;
List listOf = CollectionsKt.listOf((Object[]) new JvmPrimitiveType[]{jvmPrimitiveType, jvmPrimitiveType2, JvmPrimitiveType.DOUBLE, JvmPrimitiveType.FLOAT, jvmPrimitiveType2, JvmPrimitiveType.INT, JvmPrimitiveType.LONG, JvmPrimitiveType.SHORT});
LinkedHashSet linkedHashSet = new LinkedHashSet();
Iterator it = listOf.iterator();
while (it.hasNext()) {
String asString = ((JvmPrimitiveType) it.next()).getWrapperFqName().shortName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
String[] constructors = signatureBuildingComponents.constructors("Ljava/lang/String;");
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, signatureBuildingComponents.inJavaLang(asString, (String[]) Arrays.copyOf(constructors, constructors.length)));
}
return linkedHashSet;
}
private final Set<String> buildPrimitiveValueMethodsSet() {
SignatureBuildingComponents signatureBuildingComponents = SignatureBuildingComponents.INSTANCE;
List<JvmPrimitiveType> listOf = CollectionsKt.listOf((Object[]) new JvmPrimitiveType[]{JvmPrimitiveType.BOOLEAN, JvmPrimitiveType.CHAR});
LinkedHashSet linkedHashSet = new LinkedHashSet();
for (JvmPrimitiveType jvmPrimitiveType : listOf) {
String asString = jvmPrimitiveType.getWrapperFqName().shortName().asString();
Intrinsics.checkNotNullExpressionValue(asString, "asString(...)");
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, signatureBuildingComponents.inJavaLang(asString, jvmPrimitiveType.getJavaKeywordName() + "Value()" + jvmPrimitiveType.getDesc()));
}
return linkedHashSet;
}
public final Set<String> getDEPRECATED_LIST_METHODS() {
return DEPRECATED_LIST_METHODS;
}
public final Set<String> getDROP_LIST_METHOD_SIGNATURES() {
return DROP_LIST_METHOD_SIGNATURES;
}
public final Set<String> getHIDDEN_CONSTRUCTOR_SIGNATURES() {
return HIDDEN_CONSTRUCTOR_SIGNATURES;
}
public final Set<String> getHIDDEN_METHOD_SIGNATURES() {
return HIDDEN_METHOD_SIGNATURES;
}
public final Set<String> getMUTABLE_METHOD_SIGNATURES() {
return MUTABLE_METHOD_SIGNATURES;
}
public final Set<String> getVISIBLE_CONSTRUCTOR_SIGNATURES() {
return VISIBLE_CONSTRUCTOR_SIGNATURES;
}
public final Set<String> getVISIBLE_METHOD_SIGNATURES() {
return VISIBLE_METHOD_SIGNATURES;
}
public final boolean isArrayOrPrimitiveArray(FqNameUnsafe fqName) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
return Intrinsics.areEqual(fqName, StandardNames.FqNames.array) || StandardNames.isPrimitiveArray(fqName);
}
public final boolean isSerializableInJava(FqNameUnsafe fqName) {
Intrinsics.checkNotNullParameter(fqName, "fqName");
if (isArrayOrPrimitiveArray(fqName)) {
return true;
}
ClassId mapKotlinToJava = JavaToKotlinClassMap.INSTANCE.mapKotlinToJava(fqName);
if (mapKotlinToJava == null) {
return false;
}
try {
return Serializable.class.isAssignableFrom(Class.forName(mapKotlinToJava.asSingleFqName().asString()));
} catch (ClassNotFoundException unused) {
return false;
}
}
}

View File

@@ -0,0 +1,50 @@
package kotlin.reflect.jvm.internal.impl.builtins.jvm;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
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.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor;
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
import kotlin.reflect.jvm.internal.impl.types.TypeConstructorSubstitution;
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
@SourceDebugExtension({"SMAP\nmappingUtil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 mappingUtil.kt\norg/jetbrains/kotlin/builtins/jvm/MappingUtilKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,24:1\n1549#2:25\n1620#2,3:26\n1549#2:29\n1620#2,3:30\n*S KotlinDebug\n*F\n+ 1 mappingUtil.kt\norg/jetbrains/kotlin/builtins/jvm/MappingUtilKt\n*L\n20#1:25\n20#1:26,3\n21#1:29\n21#1:30,3\n*E\n"})
/* loaded from: classes3.dex */
public final class MappingUtilKt {
public static final TypeConstructorSubstitution createMappedTypeParametersSubstitution(ClassDescriptor from, ClassDescriptor to) {
int collectionSizeOrDefault;
int collectionSizeOrDefault2;
Intrinsics.checkNotNullParameter(from, "from");
Intrinsics.checkNotNullParameter(to, "to");
from.getDeclaredTypeParameters().size();
to.getDeclaredTypeParameters().size();
TypeConstructorSubstitution.Companion companion = TypeConstructorSubstitution.Companion;
List<TypeParameterDescriptor> declaredTypeParameters = from.getDeclaredTypeParameters();
Intrinsics.checkNotNullExpressionValue(declaredTypeParameters, "getDeclaredTypeParameters(...)");
List<TypeParameterDescriptor> list = declaredTypeParameters;
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10);
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<T> it = list.iterator();
while (it.hasNext()) {
arrayList.add(((TypeParameterDescriptor) it.next()).getTypeConstructor());
}
List<TypeParameterDescriptor> declaredTypeParameters2 = to.getDeclaredTypeParameters();
Intrinsics.checkNotNullExpressionValue(declaredTypeParameters2, "getDeclaredTypeParameters(...)");
List<TypeParameterDescriptor> list2 = declaredTypeParameters2;
collectionSizeOrDefault2 = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault2);
Iterator<T> it2 = list2.iterator();
while (it2.hasNext()) {
SimpleType defaultType = ((TypeParameterDescriptor) it2.next()).getDefaultType();
Intrinsics.checkNotNullExpressionValue(defaultType, "getDefaultType(...)");
arrayList2.add(TypeUtilsKt.asTypeProjection(defaultType));
}
return TypeConstructorSubstitution.Companion.createByConstructorsMap$default(companion, MapsKt.toMap(CollectionsKt.zip(arrayList, arrayList2)), false, 2, null);
}
}