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:
@@ -0,0 +1,70 @@
|
||||
package kotlin.reflect.jvm.internal.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Ref;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.SourceElement;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JvmAbi;
|
||||
import kotlin.reflect.jvm.internal.impl.load.java.JvmAnnotationNames;
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nSpecialJvmAnnotations.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SpecialJvmAnnotations.kt\norg/jetbrains/kotlin/SpecialJvmAnnotations\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,42:1\n1620#2,3:43\n*S KotlinDebug\n*F\n+ 1 SpecialJvmAnnotations.kt\norg/jetbrains/kotlin/SpecialJvmAnnotations\n*L\n22#1:43,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SpecialJvmAnnotations {
|
||||
public static final SpecialJvmAnnotations INSTANCE = new SpecialJvmAnnotations();
|
||||
private static final ClassId JAVA_LANG_ANNOTATION_REPEATABLE;
|
||||
private static final Set<ClassId> SPECIAL_ANNOTATIONS;
|
||||
|
||||
static {
|
||||
List listOf = CollectionsKt.listOf((Object[]) new FqName[]{JvmAnnotationNames.METADATA_FQ_NAME, JvmAnnotationNames.JETBRAINS_NOT_NULL_ANNOTATION, JvmAnnotationNames.JETBRAINS_NULLABLE_ANNOTATION, JvmAnnotationNames.TARGET_ANNOTATION, JvmAnnotationNames.RETENTION_ANNOTATION, JvmAnnotationNames.DOCUMENTED_ANNOTATION});
|
||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||
Iterator it = listOf.iterator();
|
||||
while (it.hasNext()) {
|
||||
linkedHashSet.add(ClassId.topLevel((FqName) it.next()));
|
||||
}
|
||||
SPECIAL_ANNOTATIONS = linkedHashSet;
|
||||
ClassId classId = ClassId.topLevel(JvmAnnotationNames.REPEATABLE_ANNOTATION);
|
||||
Intrinsics.checkNotNullExpressionValue(classId, "topLevel(...)");
|
||||
JAVA_LANG_ANNOTATION_REPEATABLE = classId;
|
||||
}
|
||||
|
||||
private SpecialJvmAnnotations() {
|
||||
}
|
||||
|
||||
public final ClassId getJAVA_LANG_ANNOTATION_REPEATABLE() {
|
||||
return JAVA_LANG_ANNOTATION_REPEATABLE;
|
||||
}
|
||||
|
||||
public final Set<ClassId> getSPECIAL_ANNOTATIONS() {
|
||||
return SPECIAL_ANNOTATIONS;
|
||||
}
|
||||
|
||||
public final boolean isAnnotatedWithContainerMetaAnnotation(KotlinJvmBinaryClass klass) {
|
||||
Intrinsics.checkNotNullParameter(klass, "klass");
|
||||
final Ref.BooleanRef booleanRef = new Ref.BooleanRef();
|
||||
klass.loadClassAnnotations(new KotlinJvmBinaryClass.AnnotationVisitor() { // from class: kotlin.reflect.jvm.internal.impl.SpecialJvmAnnotations$isAnnotatedWithContainerMetaAnnotation$1
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass.AnnotationVisitor
|
||||
public KotlinJvmBinaryClass.AnnotationArgumentVisitor visitAnnotation(ClassId classId, SourceElement source) {
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
if (!Intrinsics.areEqual(classId, JvmAbi.INSTANCE.getREPEATABLE_ANNOTATION_CONTAINER_META_ANNOTATION())) {
|
||||
return null;
|
||||
}
|
||||
Ref.BooleanRef.this.element = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinJvmBinaryClass.AnnotationVisitor
|
||||
public void visitEnd() {
|
||||
}
|
||||
}, null);
|
||||
return booleanRef.element;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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 {
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.builtins;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FunctionInterfacePackageFragment extends BuiltInsPackageFragment {
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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});
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface CallableDescriptor extends DeclarationDescriptorNonRoot, DeclarationDescriptorWithVisibility, Substitutable<CallableDescriptor> {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface UserDataKey<V> {
|
||||
}
|
||||
|
||||
List<ReceiverParameterDescriptor> getContextReceiverParameters();
|
||||
|
||||
ReceiverParameterDescriptor getDispatchReceiverParameter();
|
||||
|
||||
ReceiverParameterDescriptor getExtensionReceiverParameter();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
CallableDescriptor getOriginal();
|
||||
|
||||
Collection<? extends CallableDescriptor> getOverriddenDescriptors();
|
||||
|
||||
KotlinType getReturnType();
|
||||
|
||||
List<TypeParameterDescriptor> getTypeParameters();
|
||||
|
||||
<V> V getUserData(UserDataKey<V> userDataKey);
|
||||
|
||||
List<ValueParameterDescriptor> getValueParameters();
|
||||
|
||||
boolean hasSynthesizedParameterNames();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface CallableMemberDescriptor extends CallableDescriptor, MemberDescriptor {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum Kind {
|
||||
DECLARATION,
|
||||
FAKE_OVERRIDE,
|
||||
DELEGATION,
|
||||
SYNTHESIZED;
|
||||
|
||||
public boolean isReal() {
|
||||
return this != FAKE_OVERRIDE;
|
||||
}
|
||||
}
|
||||
|
||||
CallableMemberDescriptor copy(DeclarationDescriptor declarationDescriptor, Modality modality, DescriptorVisibility descriptorVisibility, Kind kind, boolean z3);
|
||||
|
||||
Kind getKind();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
CallableMemberDescriptor getOriginal();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
Collection<? extends CallableMemberDescriptor> getOverriddenDescriptors();
|
||||
|
||||
void setOverriddenDescriptors(Collection<? extends CallableMemberDescriptor> collection);
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class CapturedTypeParameterDescriptor implements TypeParameterDescriptor {
|
||||
private final DeclarationDescriptor declarationDescriptor;
|
||||
private final int declaredTypeParametersCount;
|
||||
private final TypeParameterDescriptor originalDescriptor;
|
||||
|
||||
public CapturedTypeParameterDescriptor(TypeParameterDescriptor originalDescriptor, DeclarationDescriptor declarationDescriptor, int i) {
|
||||
Intrinsics.checkNotNullParameter(originalDescriptor, "originalDescriptor");
|
||||
Intrinsics.checkNotNullParameter(declarationDescriptor, "declarationDescriptor");
|
||||
this.originalDescriptor = originalDescriptor;
|
||||
this.declarationDescriptor = declarationDescriptor;
|
||||
this.declaredTypeParametersCount = i;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
public <R, D> R accept(DeclarationDescriptorVisitor<R, D> declarationDescriptorVisitor, D d4) {
|
||||
return (R) this.originalDescriptor.accept(declarationDescriptorVisitor, d4);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated
|
||||
public Annotations getAnnotations() {
|
||||
return this.originalDescriptor.getAnnotations();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
public DeclarationDescriptor getContainingDeclaration() {
|
||||
return this.declarationDescriptor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
public SimpleType getDefaultType() {
|
||||
return this.originalDescriptor.getDefaultType();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public int getIndex() {
|
||||
return this.originalDescriptor.getIndex() + this.declaredTypeParametersCount;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.Named
|
||||
public Name getName() {
|
||||
return this.originalDescriptor.getName();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithSource
|
||||
public SourceElement getSource() {
|
||||
return this.originalDescriptor.getSource();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public StorageManager getStorageManager() {
|
||||
return this.originalDescriptor.getStorageManager();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
public TypeConstructor getTypeConstructor() {
|
||||
return this.originalDescriptor.getTypeConstructor();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public List<KotlinType> getUpperBounds() {
|
||||
return this.originalDescriptor.getUpperBounds();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public Variance getVariance() {
|
||||
return this.originalDescriptor.getVariance();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public boolean isCapturedFromOuterDeclaration() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterDescriptor
|
||||
public boolean isReified() {
|
||||
return this.originalDescriptor.isReified();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.originalDescriptor + "[inner-copy]";
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
public TypeParameterDescriptor getOriginal() {
|
||||
TypeParameterDescriptor original = this.originalDescriptor.getOriginal();
|
||||
Intrinsics.checkNotNullExpressionValue(original, "getOriginal(...)");
|
||||
return original;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ClassConstructorDescriptor extends ConstructorDescriptor {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ClassConstructorDescriptor getOriginal();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ConstructorDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.Substitutable
|
||||
ClassConstructorDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ClassDescriptor extends ClassOrPackageFragmentDescriptor, ClassifierDescriptorWithTypeParameters {
|
||||
/* renamed from: getCompanionObjectDescriptor */
|
||||
ClassDescriptor mo1387getCompanionObjectDescriptor();
|
||||
|
||||
Collection<ClassConstructorDescriptor> getConstructors();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
DeclarationDescriptor getContainingDeclaration();
|
||||
|
||||
List<ReceiverParameterDescriptor> getContextReceivers();
|
||||
|
||||
List<TypeParameterDescriptor> getDeclaredTypeParameters();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
SimpleType getDefaultType();
|
||||
|
||||
ClassKind getKind();
|
||||
|
||||
MemberScope getMemberScope(TypeSubstitution typeSubstitution);
|
||||
|
||||
Modality getModality();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ClassDescriptor getOriginal();
|
||||
|
||||
Collection<ClassDescriptor> getSealedSubclasses();
|
||||
|
||||
MemberScope getStaticScope();
|
||||
|
||||
ReceiverParameterDescriptor getThisAsReceiverParameter();
|
||||
|
||||
MemberScope getUnsubstitutedInnerClassesScope();
|
||||
|
||||
MemberScope getUnsubstitutedMemberScope();
|
||||
|
||||
/* renamed from: getUnsubstitutedPrimaryConstructor */
|
||||
ClassConstructorDescriptor mo1388getUnsubstitutedPrimaryConstructor();
|
||||
|
||||
ValueClassRepresentation<SimpleType> getValueClassRepresentation();
|
||||
|
||||
DescriptorVisibility getVisibility();
|
||||
|
||||
boolean isCompanionObject();
|
||||
|
||||
boolean isData();
|
||||
|
||||
boolean isFun();
|
||||
|
||||
boolean isInline();
|
||||
|
||||
boolean isValue();
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import com.adif.elcanomovil.resources.IntentUtilKt;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ClassKind {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ ClassKind[] $VALUES;
|
||||
private final String codeRepresentation;
|
||||
public static final ClassKind CLASS = new ClassKind("CLASS", 0, "class");
|
||||
public static final ClassKind INTERFACE = new ClassKind("INTERFACE", 1, "interface");
|
||||
public static final ClassKind ENUM_CLASS = new ClassKind("ENUM_CLASS", 2, "enum class");
|
||||
public static final ClassKind ENUM_ENTRY = new ClassKind("ENUM_ENTRY", 3, null);
|
||||
public static final ClassKind ANNOTATION_CLASS = new ClassKind("ANNOTATION_CLASS", 4, "annotation class");
|
||||
public static final ClassKind OBJECT = new ClassKind("OBJECT", 5, IntentUtilKt.DEFAULT_NAME);
|
||||
|
||||
private static final /* synthetic */ ClassKind[] $values() {
|
||||
return new ClassKind[]{CLASS, INTERFACE, ENUM_CLASS, ENUM_ENTRY, ANNOTATION_CLASS, OBJECT};
|
||||
}
|
||||
|
||||
static {
|
||||
ClassKind[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private ClassKind(String str, int i, String str2) {
|
||||
this.codeRepresentation = str2;
|
||||
}
|
||||
|
||||
public static ClassKind valueOf(String str) {
|
||||
return (ClassKind) Enum.valueOf(ClassKind.class, str);
|
||||
}
|
||||
|
||||
public static ClassKind[] values() {
|
||||
return (ClassKind[]) $VALUES.clone();
|
||||
}
|
||||
|
||||
public final boolean isSingleton() {
|
||||
return this == OBJECT || this == ENUM_ENTRY;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ClassOrPackageFragmentDescriptor extends DeclarationDescriptorNonRoot {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ClassifierDescriptor extends DeclarationDescriptorNonRoot {
|
||||
SimpleType getDefaultType();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ClassifierDescriptor getOriginal();
|
||||
|
||||
TypeConstructor getTypeConstructor();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ClassifierDescriptorWithTypeParameters extends ClassifierDescriptor, DeclarationDescriptorWithVisibility, MemberDescriptor, Substitutable<ClassifierDescriptorWithTypeParameters> {
|
||||
List<TypeParameterDescriptor> getDeclaredTypeParameters();
|
||||
|
||||
boolean isInner();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.JvmStatic;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConstUtil {
|
||||
public static final ConstUtil INSTANCE = new ConstUtil();
|
||||
|
||||
private ConstUtil() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final boolean canBeUsedForConstVal(KotlinType type) {
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
return ConstUtilKt.canBeUsedForConstVal(type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.UnsignedTypes;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeUtils;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConstUtilKt {
|
||||
public static final boolean canBeUsedForConstVal(KotlinType kotlinType) {
|
||||
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
|
||||
return ((KotlinBuiltIns.isPrimitiveType(kotlinType) || UnsignedTypes.isUnsignedType(kotlinType)) && !TypeUtils.isNullableType(kotlinType)) || KotlinBuiltIns.isString(kotlinType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConstructorDescriptor extends FunctionDescriptor {
|
||||
ClassDescriptor getConstructedClass();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ClassifierDescriptorWithTypeParameters getContainingDeclaration();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
KotlinType getReturnType();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
List<TypeParameterDescriptor> getTypeParameters();
|
||||
|
||||
boolean isPrimary();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.Substitutable
|
||||
ConstructorDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclarationDescriptor extends Named, Annotated {
|
||||
<R, D> R accept(DeclarationDescriptorVisitor<R, D> declarationDescriptorVisitor, D d4);
|
||||
|
||||
DeclarationDescriptor getContainingDeclaration();
|
||||
|
||||
DeclarationDescriptor getOriginal();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclarationDescriptorNonRoot extends DeclarationDescriptorWithSource {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
DeclarationDescriptor getContainingDeclaration();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclarationDescriptorVisitor<R, D> {
|
||||
R visitClassDescriptor(ClassDescriptor classDescriptor, D d4);
|
||||
|
||||
R visitConstructorDescriptor(ConstructorDescriptor constructorDescriptor, D d4);
|
||||
|
||||
R visitFunctionDescriptor(FunctionDescriptor functionDescriptor, D d4);
|
||||
|
||||
R visitModuleDeclaration(ModuleDescriptor moduleDescriptor, D d4);
|
||||
|
||||
R visitPackageFragmentDescriptor(PackageFragmentDescriptor packageFragmentDescriptor, D d4);
|
||||
|
||||
R visitPackageViewDescriptor(PackageViewDescriptor packageViewDescriptor, D d4);
|
||||
|
||||
R visitPropertyDescriptor(PropertyDescriptor propertyDescriptor, D d4);
|
||||
|
||||
R visitPropertyGetterDescriptor(PropertyGetterDescriptor propertyGetterDescriptor, D d4);
|
||||
|
||||
R visitPropertySetterDescriptor(PropertySetterDescriptor propertySetterDescriptor, D d4);
|
||||
|
||||
R visitReceiverParameterDescriptor(ReceiverParameterDescriptor receiverParameterDescriptor, D d4);
|
||||
|
||||
R visitTypeAliasDescriptor(TypeAliasDescriptor typeAliasDescriptor, D d4);
|
||||
|
||||
R visitTypeParameterDescriptor(TypeParameterDescriptor typeParameterDescriptor, D d4);
|
||||
|
||||
R visitValueParameterDescriptor(ValueParameterDescriptor valueParameterDescriptor, D d4);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclarationDescriptorWithSource extends DeclarationDescriptor {
|
||||
SourceElement getSource();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeclarationDescriptorWithVisibility extends DeclarationDescriptor {
|
||||
DescriptorVisibility getVisibility();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class DelegatedDescriptorVisibility extends DescriptorVisibility {
|
||||
private final Visibility delegate;
|
||||
|
||||
public DelegatedDescriptorVisibility(Visibility delegate) {
|
||||
Intrinsics.checkNotNullParameter(delegate, "delegate");
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public Visibility getDelegate() {
|
||||
return this.delegate;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public String getInternalDisplayName() {
|
||||
return getDelegate().getInternalDisplayName();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public DescriptorVisibility normalize() {
|
||||
DescriptorVisibility descriptorVisibility = DescriptorVisibilities.toDescriptorVisibility(getDelegate().normalize());
|
||||
Intrinsics.checkNotNullExpressionValue(descriptorVisibility, "toDescriptorVisibility(...)");
|
||||
return descriptorVisibility;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.InlineClassesUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.util.OperatorNameConventions;
|
||||
|
||||
@SourceDebugExtension({"SMAP\ndescriptorUtil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 descriptorUtil.kt\norg/jetbrains/kotlin/descriptors/DescriptorUtilKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 coreLib.kt\norg/jetbrains/kotlin/utils/CoreLibKt\n*L\n1#1,108:1\n1#2:109\n19#3:110\n*S KotlinDebug\n*F\n+ 1 descriptorUtil.kt\norg/jetbrains/kotlin/descriptors/DescriptorUtilKt\n*L\n38#1:110\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DescriptorUtilKt {
|
||||
public static final ClassifierDescriptor getTopLevelContainingClassifier(DeclarationDescriptor declarationDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
|
||||
DeclarationDescriptor containingDeclaration = declarationDescriptor.getContainingDeclaration();
|
||||
if (containingDeclaration != null && !(declarationDescriptor instanceof PackageFragmentDescriptor)) {
|
||||
if (!isTopLevelInPackage(containingDeclaration)) {
|
||||
return getTopLevelContainingClassifier(containingDeclaration);
|
||||
}
|
||||
if (containingDeclaration instanceof ClassifierDescriptor) {
|
||||
return (ClassifierDescriptor) containingDeclaration;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final boolean isTopLevelInPackage(DeclarationDescriptor declarationDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(declarationDescriptor, "<this>");
|
||||
return declarationDescriptor.getContainingDeclaration() instanceof PackageFragmentDescriptor;
|
||||
}
|
||||
|
||||
public static final boolean isTypedEqualsInValueClass(FunctionDescriptor functionDescriptor) {
|
||||
SimpleType defaultType;
|
||||
KotlinType replaceArgumentsWithStarProjections;
|
||||
KotlinType returnType;
|
||||
Intrinsics.checkNotNullParameter(functionDescriptor, "<this>");
|
||||
DeclarationDescriptor containingDeclaration = functionDescriptor.getContainingDeclaration();
|
||||
ClassDescriptor classDescriptor = containingDeclaration instanceof ClassDescriptor ? (ClassDescriptor) containingDeclaration : null;
|
||||
if (classDescriptor != null) {
|
||||
ClassDescriptor classDescriptor2 = InlineClassesUtilsKt.isValueClass(classDescriptor) ? classDescriptor : null;
|
||||
if (classDescriptor2 != null && (defaultType = classDescriptor2.getDefaultType()) != null && (replaceArgumentsWithStarProjections = TypeUtilsKt.replaceArgumentsWithStarProjections(defaultType)) != null && (returnType = functionDescriptor.getReturnType()) != null && Intrinsics.areEqual(functionDescriptor.getName(), OperatorNameConventions.EQUALS) && ((TypeUtilsKt.isBoolean(returnType) || TypeUtilsKt.isNothing(returnType)) && functionDescriptor.getValueParameters().size() == 1)) {
|
||||
KotlinType type = functionDescriptor.getValueParameters().get(0).getType();
|
||||
Intrinsics.checkNotNullExpressionValue(type, "getType(...)");
|
||||
if (Intrinsics.areEqual(TypeUtilsKt.replaceArgumentsWithStarProjections(type), replaceArgumentsWithStarProjections) && functionDescriptor.getContextReceiverParameters().isEmpty() && functionDescriptor.getExtensionReceiverParameter() == null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final ClassDescriptor resolveClassByFqName(ModuleDescriptor moduleDescriptor, FqName fqName, LookupLocation lookupLocation) {
|
||||
ClassifierDescriptor classifierDescriptor;
|
||||
MemberScope unsubstitutedInnerClassesScope;
|
||||
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(lookupLocation, "lookupLocation");
|
||||
if (fqName.isRoot()) {
|
||||
return null;
|
||||
}
|
||||
FqName parent = fqName.parent();
|
||||
Intrinsics.checkNotNullExpressionValue(parent, "parent(...)");
|
||||
MemberScope memberScope = moduleDescriptor.getPackage(parent).getMemberScope();
|
||||
Name shortName = fqName.shortName();
|
||||
Intrinsics.checkNotNullExpressionValue(shortName, "shortName(...)");
|
||||
ClassifierDescriptor mo1396getContributedClassifier = memberScope.mo1396getContributedClassifier(shortName, lookupLocation);
|
||||
ClassDescriptor classDescriptor = mo1396getContributedClassifier instanceof ClassDescriptor ? (ClassDescriptor) mo1396getContributedClassifier : null;
|
||||
if (classDescriptor != null) {
|
||||
return classDescriptor;
|
||||
}
|
||||
FqName parent2 = fqName.parent();
|
||||
Intrinsics.checkNotNullExpressionValue(parent2, "parent(...)");
|
||||
ClassDescriptor resolveClassByFqName = resolveClassByFqName(moduleDescriptor, parent2, lookupLocation);
|
||||
if (resolveClassByFqName == null || (unsubstitutedInnerClassesScope = resolveClassByFqName.getUnsubstitutedInnerClassesScope()) == null) {
|
||||
classifierDescriptor = null;
|
||||
} else {
|
||||
Name shortName2 = fqName.shortName();
|
||||
Intrinsics.checkNotNullExpressionValue(shortName2, "shortName(...)");
|
||||
classifierDescriptor = unsubstitutedInnerClassesScope.mo1396getContributedClassifier(shortName2, lookupLocation);
|
||||
}
|
||||
if (classifierDescriptor instanceof ClassDescriptor) {
|
||||
return (ClassDescriptor) classifierDescriptor;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,648 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.Visibilities;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.TypeAliasConstructorDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.SuperCallReceiverValue;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ThisClassReceiver;
|
||||
import kotlin.reflect.jvm.internal.impl.types.DynamicTypesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.util.ModuleVisibilityHelper;
|
||||
import kotlin.reflect.jvm.internal.impl.utils.CollectionsKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class DescriptorVisibilities {
|
||||
public static final ReceiverValue ALWAYS_SUITABLE_RECEIVER;
|
||||
public static final DescriptorVisibility DEFAULT_VISIBILITY;
|
||||
|
||||
@Deprecated
|
||||
public static final ReceiverValue FALSE_IF_PROTECTED;
|
||||
public static final DescriptorVisibility INHERITED;
|
||||
public static final DescriptorVisibility INTERNAL;
|
||||
public static final DescriptorVisibility INVISIBLE_FAKE;
|
||||
public static final Set<DescriptorVisibility> INVISIBLE_FROM_OTHER_MODULES;
|
||||
private static final ReceiverValue IRRELEVANT_RECEIVER;
|
||||
public static final DescriptorVisibility LOCAL;
|
||||
private static final ModuleVisibilityHelper MODULE_VISIBILITY_HELPER;
|
||||
private static final Map<DescriptorVisibility, Integer> ORDERED_VISIBILITIES;
|
||||
public static final DescriptorVisibility PRIVATE;
|
||||
public static final DescriptorVisibility PRIVATE_TO_THIS;
|
||||
public static final DescriptorVisibility PROTECTED;
|
||||
public static final DescriptorVisibility PUBLIC;
|
||||
public static final DescriptorVisibility UNKNOWN;
|
||||
private static final Map<Visibility, DescriptorVisibility> visibilitiesMapping;
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x0042 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x004a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x004f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x0052 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x0057 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:24:0x005c */
|
||||
/* JADX WARN: Removed duplicated region for block: B:25:0x0061 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:26:0x0066 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:27:0x006b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:28:0x0070 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:31:0x007a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:34:0x0080 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:36:0x0045 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int r8) {
|
||||
/*
|
||||
r0 = 16
|
||||
if (r8 == r0) goto L7
|
||||
java.lang.String r1 = "Argument for @NotNull parameter '%s' of %s.%s must not be null"
|
||||
goto L9
|
||||
L7:
|
||||
java.lang.String r1 = "@NotNull method %s.%s must not return null"
|
||||
L9:
|
||||
r2 = 3
|
||||
r3 = 2
|
||||
if (r8 == r0) goto Lf
|
||||
r4 = r2
|
||||
goto L10
|
||||
Lf:
|
||||
r4 = r3
|
||||
L10:
|
||||
java.lang.Object[] r4 = new java.lang.Object[r4]
|
||||
java.lang.String r5 = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities"
|
||||
r6 = 1
|
||||
r7 = 0
|
||||
if (r8 == r6) goto L3a
|
||||
if (r8 == r2) goto L3a
|
||||
r2 = 5
|
||||
if (r8 == r2) goto L3a
|
||||
r2 = 7
|
||||
if (r8 == r2) goto L3a
|
||||
switch(r8) {
|
||||
case 9: goto L3a;
|
||||
case 10: goto L35;
|
||||
case 11: goto L30;
|
||||
case 12: goto L35;
|
||||
case 13: goto L30;
|
||||
case 14: goto L2b;
|
||||
case 15: goto L2b;
|
||||
case 16: goto L28;
|
||||
default: goto L23;
|
||||
}
|
||||
L23:
|
||||
java.lang.String r2 = "what"
|
||||
r4[r7] = r2
|
||||
goto L3e
|
||||
L28:
|
||||
r4[r7] = r5
|
||||
goto L3e
|
||||
L2b:
|
||||
java.lang.String r2 = "visibility"
|
||||
r4[r7] = r2
|
||||
goto L3e
|
||||
L30:
|
||||
java.lang.String r2 = "second"
|
||||
r4[r7] = r2
|
||||
goto L3e
|
||||
L35:
|
||||
java.lang.String r2 = "first"
|
||||
r4[r7] = r2
|
||||
goto L3e
|
||||
L3a:
|
||||
java.lang.String r2 = "from"
|
||||
r4[r7] = r2
|
||||
L3e:
|
||||
java.lang.String r2 = "toDescriptorVisibility"
|
||||
if (r8 == r0) goto L45
|
||||
r4[r6] = r5
|
||||
goto L47
|
||||
L45:
|
||||
r4[r6] = r2
|
||||
L47:
|
||||
switch(r8) {
|
||||
case 2: goto L70;
|
||||
case 3: goto L70;
|
||||
case 4: goto L6b;
|
||||
case 5: goto L6b;
|
||||
case 6: goto L66;
|
||||
case 7: goto L66;
|
||||
case 8: goto L61;
|
||||
case 9: goto L61;
|
||||
case 10: goto L5c;
|
||||
case 11: goto L5c;
|
||||
case 12: goto L57;
|
||||
case 13: goto L57;
|
||||
case 14: goto L52;
|
||||
case 15: goto L4f;
|
||||
case 16: goto L74;
|
||||
default: goto L4a;
|
||||
}
|
||||
L4a:
|
||||
java.lang.String r2 = "isVisible"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L4f:
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L52:
|
||||
java.lang.String r2 = "isPrivate"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L57:
|
||||
java.lang.String r2 = "compare"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L5c:
|
||||
java.lang.String r2 = "compareLocal"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L61:
|
||||
java.lang.String r2 = "findInvisibleMember"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L66:
|
||||
java.lang.String r2 = "inSameFile"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L6b:
|
||||
java.lang.String r2 = "isVisibleWithAnyReceiver"
|
||||
r4[r3] = r2
|
||||
goto L74
|
||||
L70:
|
||||
java.lang.String r2 = "isVisibleIgnoringReceiver"
|
||||
r4[r3] = r2
|
||||
L74:
|
||||
java.lang.String r1 = java.lang.String.format(r1, r4)
|
||||
if (r8 == r0) goto L80
|
||||
java.lang.IllegalArgumentException r8 = new java.lang.IllegalArgumentException
|
||||
r8.<init>(r1)
|
||||
goto L85
|
||||
L80:
|
||||
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
|
||||
r8.<init>(r1)
|
||||
L85:
|
||||
throw r8
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.$$$reportNull$$$0(int):void");
|
||||
}
|
||||
|
||||
static {
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility = new DelegatedDescriptorVisibility(Visibilities.Private.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i == 1) {
|
||||
objArr[0] = "what";
|
||||
} else if (i != 2) {
|
||||
objArr[0] = "descriptor";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$1";
|
||||
if (i == 1 || i == 2) {
|
||||
objArr[2] = "isVisible";
|
||||
} else {
|
||||
objArr[2] = "hasContainingSourceFile";
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
private boolean hasContainingSourceFile(DeclarationDescriptor declarationDescriptor) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
return DescriptorUtils.getContainingSourceFile(declarationDescriptor) != SourceFile.NO_SOURCE_FILE;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r3v0, types: [kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithVisibility] */
|
||||
/* JADX WARN: Type inference failed for: r3v1, types: [kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor] */
|
||||
/* JADX WARN: Type inference failed for: r3v2, types: [kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor] */
|
||||
/* JADX WARN: Type inference failed for: r3v4, types: [kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor] */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == 0) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (DescriptorUtils.isTopLevelDeclaration(declarationDescriptorWithVisibility) && hasContainingSourceFile(declarationDescriptor)) {
|
||||
return DescriptorVisibilities.inSameFile(declarationDescriptorWithVisibility, declarationDescriptor);
|
||||
}
|
||||
if (declarationDescriptorWithVisibility instanceof ConstructorDescriptor) {
|
||||
ClassifierDescriptorWithTypeParameters containingDeclaration = ((ConstructorDescriptor) declarationDescriptorWithVisibility).getContainingDeclaration();
|
||||
if (z3 && DescriptorUtils.isSealedClass(containingDeclaration) && DescriptorUtils.isTopLevelDeclaration(containingDeclaration) && (declarationDescriptor instanceof ConstructorDescriptor) && DescriptorUtils.isTopLevelDeclaration(declarationDescriptor.getContainingDeclaration()) && DescriptorVisibilities.inSameFile(declarationDescriptorWithVisibility, declarationDescriptor)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
while (declarationDescriptorWithVisibility != 0) {
|
||||
declarationDescriptorWithVisibility = declarationDescriptorWithVisibility.getContainingDeclaration();
|
||||
if (((declarationDescriptorWithVisibility instanceof ClassDescriptor) && !DescriptorUtils.isCompanionObject(declarationDescriptorWithVisibility)) || (declarationDescriptorWithVisibility instanceof PackageFragmentDescriptor)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (declarationDescriptorWithVisibility == 0) {
|
||||
return false;
|
||||
}
|
||||
while (declarationDescriptor != null) {
|
||||
if (declarationDescriptorWithVisibility == declarationDescriptor) {
|
||||
return true;
|
||||
}
|
||||
if (declarationDescriptor instanceof PackageFragmentDescriptor) {
|
||||
return (declarationDescriptorWithVisibility instanceof PackageFragmentDescriptor) && declarationDescriptorWithVisibility.getFqName().equals(((PackageFragmentDescriptor) declarationDescriptor).getFqName()) && DescriptorUtils.areInSameModule(declarationDescriptor, declarationDescriptorWithVisibility);
|
||||
}
|
||||
declarationDescriptor = declarationDescriptor.getContainingDeclaration();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
PRIVATE = delegatedDescriptorVisibility;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility2 = new DelegatedDescriptorVisibility(Visibilities.PrivateToThis.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.2
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$2";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
DeclarationDescriptor parentOfType;
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (!DescriptorVisibilities.PRIVATE.isVisible(receiverValue, declarationDescriptorWithVisibility, declarationDescriptor, z3)) {
|
||||
return false;
|
||||
}
|
||||
if (receiverValue == DescriptorVisibilities.ALWAYS_SUITABLE_RECEIVER) {
|
||||
return true;
|
||||
}
|
||||
if (receiverValue == DescriptorVisibilities.IRRELEVANT_RECEIVER || (parentOfType = DescriptorUtils.getParentOfType(declarationDescriptorWithVisibility, ClassDescriptor.class)) == null || !(receiverValue instanceof ThisClassReceiver)) {
|
||||
return false;
|
||||
}
|
||||
return ((ThisClassReceiver) receiverValue).getClassDescriptor().getOriginal().equals(parentOfType.getOriginal());
|
||||
}
|
||||
};
|
||||
PRIVATE_TO_THIS = delegatedDescriptorVisibility2;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility3 = new DelegatedDescriptorVisibility(Visibilities.Protected.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.3
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i == 1) {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
} else if (i == 2) {
|
||||
objArr[0] = "whatDeclaration";
|
||||
} else if (i != 3) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = "fromClass";
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$3";
|
||||
if (i == 2 || i == 3) {
|
||||
objArr[2] = "doesReceiverFitForProtectedVisibility";
|
||||
} else {
|
||||
objArr[2] = "isVisible";
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
private boolean doesReceiverFitForProtectedVisibility(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, ClassDescriptor classDescriptor) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (classDescriptor == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
if (receiverValue == DescriptorVisibilities.FALSE_IF_PROTECTED) {
|
||||
return false;
|
||||
}
|
||||
if (!(declarationDescriptorWithVisibility instanceof CallableMemberDescriptor) || (declarationDescriptorWithVisibility instanceof ConstructorDescriptor) || receiverValue == DescriptorVisibilities.ALWAYS_SUITABLE_RECEIVER) {
|
||||
return true;
|
||||
}
|
||||
if (receiverValue == DescriptorVisibilities.IRRELEVANT_RECEIVER || receiverValue == null) {
|
||||
return false;
|
||||
}
|
||||
KotlinType thisType = receiverValue instanceof SuperCallReceiverValue ? ((SuperCallReceiverValue) receiverValue).getThisType() : receiverValue.getType();
|
||||
return DescriptorUtils.isSubtypeOfClass(thisType, classDescriptor) || DynamicTypesKt.isDynamic(thisType);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
ClassDescriptor classDescriptor;
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
ClassDescriptor classDescriptor2 = (ClassDescriptor) DescriptorUtils.getParentOfType(declarationDescriptorWithVisibility, ClassDescriptor.class);
|
||||
ClassDescriptor classDescriptor3 = (ClassDescriptor) DescriptorUtils.getParentOfType(declarationDescriptor, ClassDescriptor.class, false);
|
||||
if (classDescriptor3 == null) {
|
||||
return false;
|
||||
}
|
||||
if (classDescriptor2 != null && DescriptorUtils.isCompanionObject(classDescriptor2) && (classDescriptor = (ClassDescriptor) DescriptorUtils.getParentOfType(classDescriptor2, ClassDescriptor.class)) != null && DescriptorUtils.isSubclass(classDescriptor3, classDescriptor)) {
|
||||
return true;
|
||||
}
|
||||
DeclarationDescriptorWithVisibility unwrapFakeOverrideToAnyDeclaration = DescriptorUtils.unwrapFakeOverrideToAnyDeclaration(declarationDescriptorWithVisibility);
|
||||
ClassDescriptor classDescriptor4 = (ClassDescriptor) DescriptorUtils.getParentOfType(unwrapFakeOverrideToAnyDeclaration, ClassDescriptor.class);
|
||||
if (classDescriptor4 == null) {
|
||||
return false;
|
||||
}
|
||||
if (DescriptorUtils.isSubclass(classDescriptor3, classDescriptor4) && doesReceiverFitForProtectedVisibility(receiverValue, unwrapFakeOverrideToAnyDeclaration, classDescriptor3)) {
|
||||
return true;
|
||||
}
|
||||
return isVisible(receiverValue, declarationDescriptorWithVisibility, classDescriptor3.getContainingDeclaration(), z3);
|
||||
}
|
||||
};
|
||||
PROTECTED = delegatedDescriptorVisibility3;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility4 = new DelegatedDescriptorVisibility(Visibilities.Internal.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.4
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$4";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
if (DescriptorUtils.getContainingModule(declarationDescriptor).shouldSeeInternalsOf(DescriptorUtils.getContainingModule(declarationDescriptorWithVisibility))) {
|
||||
return DescriptorVisibilities.MODULE_VISIBILITY_HELPER.isInFriendModule(declarationDescriptorWithVisibility, declarationDescriptor);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
INTERNAL = delegatedDescriptorVisibility4;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility5 = new DelegatedDescriptorVisibility(Visibilities.Public.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.5
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$5";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
PUBLIC = delegatedDescriptorVisibility5;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility6 = new DelegatedDescriptorVisibility(Visibilities.Local.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.6
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$6";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
throw new IllegalStateException("This method shouldn't be invoked for LOCAL visibility");
|
||||
}
|
||||
};
|
||||
LOCAL = delegatedDescriptorVisibility6;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility7 = new DelegatedDescriptorVisibility(Visibilities.Inherited.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.7
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$7";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
throw new IllegalStateException("Visibility is unknown yet");
|
||||
}
|
||||
};
|
||||
INHERITED = delegatedDescriptorVisibility7;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility8 = new DelegatedDescriptorVisibility(Visibilities.InvisibleFake.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.8
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$8";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
INVISIBLE_FAKE = delegatedDescriptorVisibility8;
|
||||
DelegatedDescriptorVisibility delegatedDescriptorVisibility9 = new DelegatedDescriptorVisibility(Visibilities.Unknown.INSTANCE) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.9
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
Object[] objArr = new Object[3];
|
||||
if (i != 1) {
|
||||
objArr[0] = "what";
|
||||
} else {
|
||||
objArr[0] = Constants.MessagePayloadKeys.FROM;
|
||||
}
|
||||
objArr[1] = "kotlin/reflect/jvm/internal/impl/descriptors/DescriptorVisibilities$9";
|
||||
objArr[2] = "isVisible";
|
||||
throw new IllegalArgumentException(String.format("Argument for @NotNull parameter '%s' of %s.%s must not be null", objArr));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibility
|
||||
public boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
UNKNOWN = delegatedDescriptorVisibility9;
|
||||
INVISIBLE_FROM_OTHER_MODULES = Collections.unmodifiableSet(SetsKt.setOf((Object[]) new DescriptorVisibility[]{delegatedDescriptorVisibility, delegatedDescriptorVisibility2, delegatedDescriptorVisibility4, delegatedDescriptorVisibility6}));
|
||||
HashMap newHashMapWithExpectedSize = CollectionsKt.newHashMapWithExpectedSize(4);
|
||||
newHashMapWithExpectedSize.put(delegatedDescriptorVisibility2, 0);
|
||||
newHashMapWithExpectedSize.put(delegatedDescriptorVisibility, 0);
|
||||
newHashMapWithExpectedSize.put(delegatedDescriptorVisibility4, 1);
|
||||
newHashMapWithExpectedSize.put(delegatedDescriptorVisibility3, 1);
|
||||
newHashMapWithExpectedSize.put(delegatedDescriptorVisibility5, 2);
|
||||
ORDERED_VISIBILITIES = Collections.unmodifiableMap(newHashMapWithExpectedSize);
|
||||
DEFAULT_VISIBILITY = delegatedDescriptorVisibility5;
|
||||
IRRELEVANT_RECEIVER = new ReceiverValue() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.10
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue
|
||||
public KotlinType getType() {
|
||||
throw new IllegalStateException("This method should not be called");
|
||||
}
|
||||
};
|
||||
ALWAYS_SUITABLE_RECEIVER = new ReceiverValue() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.11
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue
|
||||
public KotlinType getType() {
|
||||
throw new IllegalStateException("This method should not be called");
|
||||
}
|
||||
};
|
||||
FALSE_IF_PROTECTED = new ReceiverValue() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.DescriptorVisibilities.12
|
||||
@Override // kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue
|
||||
public KotlinType getType() {
|
||||
throw new IllegalStateException("This method should not be called");
|
||||
}
|
||||
};
|
||||
Iterator it = ServiceLoader.load(ModuleVisibilityHelper.class, ModuleVisibilityHelper.class.getClassLoader()).iterator();
|
||||
MODULE_VISIBILITY_HELPER = it.hasNext() ? (ModuleVisibilityHelper) it.next() : ModuleVisibilityHelper.EMPTY.INSTANCE;
|
||||
visibilitiesMapping = new HashMap();
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility2);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility3);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility4);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility5);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility6);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility7);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility8);
|
||||
recordVisibilityMapping(delegatedDescriptorVisibility9);
|
||||
}
|
||||
|
||||
public static Integer compare(DescriptorVisibility descriptorVisibility, DescriptorVisibility descriptorVisibility2) {
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(12);
|
||||
}
|
||||
if (descriptorVisibility2 == null) {
|
||||
$$$reportNull$$$0(13);
|
||||
}
|
||||
Integer compareTo = descriptorVisibility.compareTo(descriptorVisibility2);
|
||||
if (compareTo != null) {
|
||||
return compareTo;
|
||||
}
|
||||
Integer compareTo2 = descriptorVisibility2.compareTo(descriptorVisibility);
|
||||
if (compareTo2 != null) {
|
||||
return Integer.valueOf(-compareTo2.intValue());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static DeclarationDescriptorWithVisibility findInvisibleMember(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
DeclarationDescriptorWithVisibility findInvisibleMember;
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(8);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(9);
|
||||
}
|
||||
for (DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility2 = (DeclarationDescriptorWithVisibility) declarationDescriptorWithVisibility.getOriginal(); declarationDescriptorWithVisibility2 != null && declarationDescriptorWithVisibility2.getVisibility() != LOCAL; declarationDescriptorWithVisibility2 = (DeclarationDescriptorWithVisibility) DescriptorUtils.getParentOfType(declarationDescriptorWithVisibility2, DeclarationDescriptorWithVisibility.class)) {
|
||||
if (!declarationDescriptorWithVisibility2.getVisibility().isVisible(receiverValue, declarationDescriptorWithVisibility2, declarationDescriptor, z3)) {
|
||||
return declarationDescriptorWithVisibility2;
|
||||
}
|
||||
}
|
||||
if (!(declarationDescriptorWithVisibility instanceof TypeAliasConstructorDescriptor) || (findInvisibleMember = findInvisibleMember(receiverValue, ((TypeAliasConstructorDescriptor) declarationDescriptorWithVisibility).getUnderlyingConstructorDescriptor(), declarationDescriptor, z3)) == null) {
|
||||
return null;
|
||||
}
|
||||
return findInvisibleMember;
|
||||
}
|
||||
|
||||
public static boolean inSameFile(DeclarationDescriptor declarationDescriptor, DeclarationDescriptor declarationDescriptor2) {
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(6);
|
||||
}
|
||||
if (declarationDescriptor2 == null) {
|
||||
$$$reportNull$$$0(7);
|
||||
}
|
||||
SourceFile containingSourceFile = DescriptorUtils.getContainingSourceFile(declarationDescriptor2);
|
||||
if (containingSourceFile != SourceFile.NO_SOURCE_FILE) {
|
||||
return containingSourceFile.equals(DescriptorUtils.getContainingSourceFile(declarationDescriptor));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPrivate(DescriptorVisibility descriptorVisibility) {
|
||||
if (descriptorVisibility == null) {
|
||||
$$$reportNull$$$0(14);
|
||||
}
|
||||
return descriptorVisibility == PRIVATE || descriptorVisibility == PRIVATE_TO_THIS;
|
||||
}
|
||||
|
||||
public static boolean isVisibleIgnoringReceiver(DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3) {
|
||||
if (declarationDescriptorWithVisibility == null) {
|
||||
$$$reportNull$$$0(2);
|
||||
}
|
||||
if (declarationDescriptor == null) {
|
||||
$$$reportNull$$$0(3);
|
||||
}
|
||||
return findInvisibleMember(ALWAYS_SUITABLE_RECEIVER, declarationDescriptorWithVisibility, declarationDescriptor, z3) == null;
|
||||
}
|
||||
|
||||
private static void recordVisibilityMapping(DescriptorVisibility descriptorVisibility) {
|
||||
visibilitiesMapping.put(descriptorVisibility.getDelegate(), descriptorVisibility);
|
||||
}
|
||||
|
||||
public static DescriptorVisibility toDescriptorVisibility(Visibility visibility) {
|
||||
if (visibility == null) {
|
||||
$$$reportNull$$$0(15);
|
||||
}
|
||||
DescriptorVisibility descriptorVisibility = visibilitiesMapping.get(visibility);
|
||||
if (descriptorVisibility != null) {
|
||||
return descriptorVisibility;
|
||||
}
|
||||
throw new IllegalArgumentException("Inapplicable visibility: " + visibility);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class DescriptorVisibility {
|
||||
public final Integer compareTo(DescriptorVisibility visibility) {
|
||||
Intrinsics.checkNotNullParameter(visibility, "visibility");
|
||||
return getDelegate().compareTo(visibility.getDelegate());
|
||||
}
|
||||
|
||||
public abstract Visibility getDelegate();
|
||||
|
||||
public abstract String getInternalDisplayName();
|
||||
|
||||
public final boolean isPublicAPI() {
|
||||
return getDelegate().isPublicAPI();
|
||||
}
|
||||
|
||||
public abstract boolean isVisible(ReceiverValue receiverValue, DeclarationDescriptorWithVisibility declarationDescriptorWithVisibility, DeclarationDescriptor declarationDescriptor, boolean z3);
|
||||
|
||||
public abstract DescriptorVisibility normalize();
|
||||
|
||||
public final String toString() {
|
||||
return getDelegate().toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DeserializedDeclarationsFromSupertypeConflictDataKey implements CallableDescriptor.UserDataKey<CallableMemberDescriptor> {
|
||||
public static final DeserializedDeclarationsFromSupertypeConflictDataKey INSTANCE = new DeserializedDeclarationsFromSupertypeConflictDataKey();
|
||||
|
||||
private DeserializedDeclarationsFromSupertypeConflictDataKey() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface DeserializedDescriptor extends DeclarationDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FieldDescriptor extends Annotated {
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.FunctionReference;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.reflect.KDeclarationContainer;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$1 extends FunctionReference implements Function1<ClassId, ClassId> {
|
||||
public static final FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$1 INSTANCE = new FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$1();
|
||||
|
||||
public FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$1() {
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
|
||||
public final String getName() {
|
||||
return "getOuterClassId";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final KDeclarationContainer getOwner() {
|
||||
return Reflection.getOrCreateKotlinClass(ClassId.class);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.internal.CallableReference
|
||||
public final String getSignature() {
|
||||
return "getOuterClassId()Lorg/jetbrains/kotlin/name/ClassId;";
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final ClassId invoke(ClassId p02) {
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
return p02.getOuterClassId();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.ClassId;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nfindClassInModule.kt\nKotlin\n*S Kotlin\n*F\n+ 1 findClassInModule.kt\norg/jetbrains/kotlin/descriptors/FindClassInModuleKt\n*L\n1#1,66:1\n43#1,2:67\n*S KotlinDebug\n*F\n+ 1 findClassInModule.kt\norg/jetbrains/kotlin/descriptors/FindClassInModuleKt\n*L\n23#1:67,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FindClassInModuleKt {
|
||||
public static final ClassDescriptor findClassAcrossModuleDependencies(ModuleDescriptor moduleDescriptor, ClassId classId) {
|
||||
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
ClassifierDescriptor findClassifierAcrossModuleDependencies = findClassifierAcrossModuleDependencies(moduleDescriptor, classId);
|
||||
if (findClassifierAcrossModuleDependencies instanceof ClassDescriptor) {
|
||||
return (ClassDescriptor) findClassifierAcrossModuleDependencies;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:28:0x00e4 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:47:0x0149 A[RETURN] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor findClassifierAcrossModuleDependencies(kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor r9, kotlin.reflect.jvm.internal.impl.name.ClassId r10) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 330
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt.findClassifierAcrossModuleDependencies(kotlin.reflect.jvm.internal.impl.descriptors.ModuleDescriptor, kotlin.reflect.jvm.internal.impl.name.ClassId):kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor");
|
||||
}
|
||||
|
||||
public static final ClassDescriptor findNonGenericClassAcrossDependencies(ModuleDescriptor moduleDescriptor, ClassId classId, NotFoundClasses notFoundClasses) {
|
||||
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
Intrinsics.checkNotNullParameter(notFoundClasses, "notFoundClasses");
|
||||
ClassDescriptor findClassAcrossModuleDependencies = findClassAcrossModuleDependencies(moduleDescriptor, classId);
|
||||
return findClassAcrossModuleDependencies != null ? findClassAcrossModuleDependencies : notFoundClasses.getClass(classId, SequencesKt.toList(SequencesKt.map(SequencesKt.generateSequence(classId, FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$1.INSTANCE), new Function1<ClassId, Integer>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.FindClassInModuleKt$findNonGenericClassAcrossDependencies$typeParametersCount$2
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Integer invoke(ClassId it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return 0;
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
public static final TypeAliasDescriptor findTypeAliasAcrossModuleDependencies(ModuleDescriptor moduleDescriptor, ClassId classId) {
|
||||
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
ClassifierDescriptor findClassifierAcrossModuleDependencies = findClassifierAcrossModuleDependencies(moduleDescriptor, classId);
|
||||
if (findClassifierAcrossModuleDependencies instanceof TypeAliasDescriptor) {
|
||||
return (TypeAliasDescriptor) findClassifierAcrossModuleDependencies;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FunctionDescriptor extends CallableMemberDescriptor {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface CopyBuilder<D extends FunctionDescriptor> {
|
||||
D build();
|
||||
|
||||
<V> CopyBuilder<D> putUserData(CallableDescriptor.UserDataKey<V> userDataKey, V v3);
|
||||
|
||||
CopyBuilder<D> setAdditionalAnnotations(Annotations annotations);
|
||||
|
||||
CopyBuilder<D> setCopyOverrides(boolean z3);
|
||||
|
||||
CopyBuilder<D> setDispatchReceiverParameter(ReceiverParameterDescriptor receiverParameterDescriptor);
|
||||
|
||||
CopyBuilder<D> setDropOriginalInContainingParts();
|
||||
|
||||
CopyBuilder<D> setExtensionReceiverParameter(ReceiverParameterDescriptor receiverParameterDescriptor);
|
||||
|
||||
CopyBuilder<D> setHiddenForResolutionEverywhereBesideSupercalls();
|
||||
|
||||
CopyBuilder<D> setHiddenToOvercomeSignatureClash();
|
||||
|
||||
CopyBuilder<D> setKind(CallableMemberDescriptor.Kind kind);
|
||||
|
||||
CopyBuilder<D> setModality(Modality modality);
|
||||
|
||||
CopyBuilder<D> setName(Name name);
|
||||
|
||||
CopyBuilder<D> setOriginal(CallableMemberDescriptor callableMemberDescriptor);
|
||||
|
||||
CopyBuilder<D> setOwner(DeclarationDescriptor declarationDescriptor);
|
||||
|
||||
CopyBuilder<D> setPreserveSourceElement();
|
||||
|
||||
CopyBuilder<D> setReturnType(KotlinType kotlinType);
|
||||
|
||||
CopyBuilder<D> setSignatureChange();
|
||||
|
||||
CopyBuilder<D> setSubstitution(TypeSubstitution typeSubstitution);
|
||||
|
||||
CopyBuilder<D> setTypeParameters(List<TypeParameterDescriptor> list);
|
||||
|
||||
CopyBuilder<D> setValueParameters(List<ValueParameterDescriptor> list);
|
||||
|
||||
CopyBuilder<D> setVisibility(DescriptorVisibility descriptorVisibility);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
DeclarationDescriptor getContainingDeclaration();
|
||||
|
||||
FunctionDescriptor getInitialSignatureDescriptor();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
FunctionDescriptor getOriginal();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
Collection<? extends FunctionDescriptor> getOverriddenDescriptors();
|
||||
|
||||
boolean isHiddenForResolutionEverywhereBesideSupercalls();
|
||||
|
||||
boolean isHiddenToOvercomeSignatureClash();
|
||||
|
||||
boolean isInfix();
|
||||
|
||||
boolean isInline();
|
||||
|
||||
boolean isOperator();
|
||||
|
||||
boolean isSuspend();
|
||||
|
||||
boolean isTailrec();
|
||||
|
||||
CopyBuilder<? extends FunctionDescriptor> newCopyBuilder();
|
||||
|
||||
FunctionDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.SimpleTypeMarker;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nInlineClassRepresentation.kt\nKotlin\n*S Kotlin\n*F\n+ 1 InlineClassRepresentation.kt\norg/jetbrains/kotlin/descriptors/InlineClassRepresentation\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,25:1\n1#2:26\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class InlineClassRepresentation<Type extends SimpleTypeMarker> extends ValueClassRepresentation<Type> {
|
||||
private final Name underlyingPropertyName;
|
||||
private final Type underlyingType;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public InlineClassRepresentation(Name underlyingPropertyName, Type underlyingType) {
|
||||
super(null);
|
||||
Intrinsics.checkNotNullParameter(underlyingPropertyName, "underlyingPropertyName");
|
||||
Intrinsics.checkNotNullParameter(underlyingType, "underlyingType");
|
||||
this.underlyingPropertyName = underlyingPropertyName;
|
||||
this.underlyingType = underlyingType;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation
|
||||
public boolean containsPropertyWithName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return Intrinsics.areEqual(this.underlyingPropertyName, name);
|
||||
}
|
||||
|
||||
public final Name getUnderlyingPropertyName() {
|
||||
return this.underlyingPropertyName;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation
|
||||
public List<Pair<Name, Type>> getUnderlyingPropertyNamesToTypes() {
|
||||
return CollectionsKt.listOf(TuplesKt.to(this.underlyingPropertyName, this.underlyingType));
|
||||
}
|
||||
|
||||
public final Type getUnderlyingType() {
|
||||
return this.underlyingType;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "InlineClassRepresentation(underlyingPropertyName=" + this.underlyingPropertyName + ", underlyingType=" + this.underlyingType + ')';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class InvalidModuleException extends IllegalStateException {
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public InvalidModuleException(String message) {
|
||||
super(message);
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class InvalidModuleExceptionKt {
|
||||
private static final ModuleCapability<InvalidModuleNotifier> INVALID_MODULE_NOTIFIER_CAPABILITY = new ModuleCapability<>("InvalidModuleNotifier");
|
||||
|
||||
public static final void moduleInvalidated(ModuleDescriptor moduleDescriptor) {
|
||||
Unit unit;
|
||||
Intrinsics.checkNotNullParameter(moduleDescriptor, "<this>");
|
||||
InvalidModuleNotifier invalidModuleNotifier = (InvalidModuleNotifier) moduleDescriptor.getCapability(INVALID_MODULE_NOTIFIER_CAPABILITY);
|
||||
if (invalidModuleNotifier != null) {
|
||||
invalidModuleNotifier.notifyModuleInvalidated(moduleDescriptor);
|
||||
unit = Unit.INSTANCE;
|
||||
} else {
|
||||
unit = null;
|
||||
}
|
||||
if (unit != null) {
|
||||
return;
|
||||
}
|
||||
throw new InvalidModuleException("Accessing invalid module descriptor " + moduleDescriptor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface InvalidModuleNotifier {
|
||||
void notifyModuleInvalidated(ModuleDescriptor moduleDescriptor);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface MemberDescriptor extends DeclarationDescriptorNonRoot, DeclarationDescriptorWithVisibility {
|
||||
Modality getModality();
|
||||
|
||||
DescriptorVisibility getVisibility();
|
||||
|
||||
boolean isActual();
|
||||
|
||||
boolean isExpect();
|
||||
|
||||
boolean isExternal();
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
|
||||
/* 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 Modality {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ Modality[] $VALUES;
|
||||
public static final Companion Companion;
|
||||
public static final Modality FINAL = new Modality("FINAL", 0);
|
||||
public static final Modality SEALED = new Modality("SEALED", 1);
|
||||
public static final Modality OPEN = new Modality("OPEN", 2);
|
||||
public static final Modality ABSTRACT = new Modality("ABSTRACT", 3);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final Modality convertFromFlags(boolean z3, boolean z4, boolean z5) {
|
||||
return z3 ? Modality.SEALED : z4 ? Modality.ABSTRACT : z5 ? Modality.OPEN : Modality.FINAL;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
private static final /* synthetic */ Modality[] $values() {
|
||||
return new Modality[]{FINAL, SEALED, OPEN, ABSTRACT};
|
||||
}
|
||||
|
||||
static {
|
||||
Modality[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
Companion = new Companion(null);
|
||||
}
|
||||
|
||||
private Modality(String str, int i) {
|
||||
}
|
||||
|
||||
public static Modality valueOf(String str) {
|
||||
return (Modality) Enum.valueOf(Modality.class, str);
|
||||
}
|
||||
|
||||
public static Modality[] values() {
|
||||
return (Modality[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ModalityUtilsKt {
|
||||
public static final boolean isFinalClass(ClassDescriptor classDescriptor) {
|
||||
Intrinsics.checkNotNullParameter(classDescriptor, "<this>");
|
||||
return classDescriptor.getModality() == Modality.FINAL && classDescriptor.getKind() != ClassKind.ENUM_CLASS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ModuleCapability<T> {
|
||||
private final String name;
|
||||
|
||||
public ModuleCapability(String name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ModuleDescriptor extends DeclarationDescriptor {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class DefaultImpls {
|
||||
public static <R, D> R accept(ModuleDescriptor moduleDescriptor, DeclarationDescriptorVisitor<R, D> visitor, D d4) {
|
||||
Intrinsics.checkNotNullParameter(visitor, "visitor");
|
||||
return visitor.visitModuleDeclaration(moduleDescriptor, d4);
|
||||
}
|
||||
|
||||
public static DeclarationDescriptor getContainingDeclaration(ModuleDescriptor moduleDescriptor) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
KotlinBuiltIns getBuiltIns();
|
||||
|
||||
<T> T getCapability(ModuleCapability<T> moduleCapability);
|
||||
|
||||
List<ModuleDescriptor> getExpectedByModules();
|
||||
|
||||
PackageViewDescriptor getPackage(FqName fqName);
|
||||
|
||||
Collection<FqName> getSubPackagesOf(FqName fqName, Function1<? super Name, Boolean> function1);
|
||||
|
||||
boolean shouldSeeInternalsOf(ModuleDescriptor moduleDescriptor);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.Pair;
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.SimpleTypeMarker;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nMultiFieldValueClassRepresentation.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MultiFieldValueClassRepresentation.kt\norg/jetbrains/kotlin/descriptors/MultiFieldValueClassRepresentation\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,24:1\n1#2:25\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class MultiFieldValueClassRepresentation<Type extends SimpleTypeMarker> extends ValueClassRepresentation<Type> {
|
||||
private final Map<Name, Type> map;
|
||||
private final List<Pair<Name, Type>> underlyingPropertyNamesToTypes;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public MultiFieldValueClassRepresentation(List<? extends Pair<Name, ? extends Type>> underlyingPropertyNamesToTypes) {
|
||||
super(null);
|
||||
Intrinsics.checkNotNullParameter(underlyingPropertyNamesToTypes, "underlyingPropertyNamesToTypes");
|
||||
this.underlyingPropertyNamesToTypes = underlyingPropertyNamesToTypes;
|
||||
Map<Name, Type> map = MapsKt.toMap(getUnderlyingPropertyNamesToTypes());
|
||||
if (map.size() != getUnderlyingPropertyNamesToTypes().size()) {
|
||||
throw new IllegalArgumentException("Some properties have the same names");
|
||||
}
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation
|
||||
public boolean containsPropertyWithName(Name name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
return this.map.containsKey(name);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ValueClassRepresentation
|
||||
public List<Pair<Name, Type>> getUnderlyingPropertyNamesToTypes() {
|
||||
return this.underlyingPropertyNamesToTypes;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "MultiFieldValueClassRepresentation(underlyingPropertyNamesToTypes=" + getUnderlyingPropertyNamesToTypes() + ')';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Named {
|
||||
Name getName();
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
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.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.collections.IntIterator;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.ranges.IntRange;
|
||||
import kotlin.ranges.RangesKt;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.ClassDescriptorBase;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.EmptyPackageFragmentDescriptor;
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.impl.TypeParameterDescriptorImpl;
|
||||
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.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.MemoizedFunctionToNotNull;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.types.ClassTypeConstructorImpl;
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class NotFoundClasses {
|
||||
private final MemoizedFunctionToNotNull<ClassRequest, ClassDescriptor> classes;
|
||||
private final ModuleDescriptor module;
|
||||
private final MemoizedFunctionToNotNull<FqName, PackageFragmentDescriptor> packageFragments;
|
||||
private final StorageManager storageManager;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ClassRequest {
|
||||
private final ClassId classId;
|
||||
private final List<Integer> typeParametersCount;
|
||||
|
||||
public ClassRequest(ClassId classId, List<Integer> typeParametersCount) {
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
Intrinsics.checkNotNullParameter(typeParametersCount, "typeParametersCount");
|
||||
this.classId = classId;
|
||||
this.typeParametersCount = typeParametersCount;
|
||||
}
|
||||
|
||||
public final ClassId component1() {
|
||||
return this.classId;
|
||||
}
|
||||
|
||||
public final List<Integer> component2() {
|
||||
return this.typeParametersCount;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ClassRequest)) {
|
||||
return false;
|
||||
}
|
||||
ClassRequest classRequest = (ClassRequest) obj;
|
||||
return Intrinsics.areEqual(this.classId, classRequest.classId) && Intrinsics.areEqual(this.typeParametersCount, classRequest.typeParametersCount);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.typeParametersCount.hashCode() + (this.classId.hashCode() * 31);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("ClassRequest(classId=");
|
||||
sb.append(this.classId);
|
||||
sb.append(", typeParametersCount=");
|
||||
return a.o(sb, this.typeParametersCount, ')');
|
||||
}
|
||||
}
|
||||
|
||||
@SourceDebugExtension({"SMAP\nNotFoundClasses.kt\nKotlin\n*S Kotlin\n*F\n+ 1 NotFoundClasses.kt\norg/jetbrains/kotlin/descriptors/NotFoundClasses$MockClassDescriptor\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,100:1\n1549#2:101\n1620#2,3:102\n*S KotlinDebug\n*F\n+ 1 NotFoundClasses.kt\norg/jetbrains/kotlin/descriptors/NotFoundClasses$MockClassDescriptor\n*L\n55#1:101\n55#1:102,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class MockClassDescriptor extends ClassDescriptorBase {
|
||||
private final List<TypeParameterDescriptor> declaredTypeParameters;
|
||||
private final boolean isInner;
|
||||
private final ClassTypeConstructorImpl typeConstructor;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public MockClassDescriptor(StorageManager storageManager, DeclarationDescriptor container, Name name, boolean z3, int i) {
|
||||
super(storageManager, container, name, SourceElement.NO_SOURCE, false);
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
|
||||
Intrinsics.checkNotNullParameter(container, "container");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
this.isInner = z3;
|
||||
IntRange until = RangesKt.until(0, i);
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(until, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<Integer> it = until.iterator();
|
||||
while (it.hasNext()) {
|
||||
int nextInt = ((IntIterator) it).nextInt();
|
||||
arrayList.add(TypeParameterDescriptorImpl.createWithDefaultBound(this, Annotations.Companion.getEMPTY(), false, Variance.INVARIANT, Name.identifier("T" + nextInt), nextInt, storageManager));
|
||||
}
|
||||
this.declaredTypeParameters = arrayList;
|
||||
this.typeConstructor = new ClassTypeConstructorImpl(this, TypeParameterUtilsKt.computeConstructorTypeParameters(this), SetsKt.setOf(DescriptorUtilsKt.getModule(this).getBuiltIns().getAnyType()), storageManager);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotated
|
||||
public Annotations getAnnotations() {
|
||||
return Annotations.Companion.getEMPTY();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
/* renamed from: getCompanionObjectDescriptor */
|
||||
public ClassDescriptor mo1387getCompanionObjectDescriptor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public Collection<ClassConstructorDescriptor> getConstructors() {
|
||||
return SetsKt.emptySet();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptorWithTypeParameters
|
||||
public List<TypeParameterDescriptor> getDeclaredTypeParameters() {
|
||||
return this.declaredTypeParameters;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public ClassKind getKind() {
|
||||
return ClassKind.CLASS;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public Modality getModality() {
|
||||
return Modality.FINAL;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public Collection<ClassDescriptor> getSealedSubclasses() {
|
||||
return CollectionsKt.emptyList();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
/* renamed from: getUnsubstitutedPrimaryConstructor */
|
||||
public ClassConstructorDescriptor mo1388getUnsubstitutedPrimaryConstructor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public ValueClassRepresentation<SimpleType> getValueClassRepresentation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorWithVisibility, kotlin.reflect.jvm.internal.impl.descriptors.MemberDescriptor
|
||||
public DescriptorVisibility getVisibility() {
|
||||
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.impl.ClassDescriptorBase, 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 this.isInner;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public boolean isValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "class " + getName() + " (not found)";
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
|
||||
public MemberScope.Empty getStaticScope() {
|
||||
return MemberScope.Empty.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
public ClassTypeConstructorImpl getTypeConstructor() {
|
||||
return this.typeConstructor;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.impl.ModuleAwareClassDescriptor
|
||||
public MemberScope.Empty getUnsubstitutedMemberScope(KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
|
||||
return MemberScope.Empty.INSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
public NotFoundClasses(StorageManager storageManager, ModuleDescriptor module) {
|
||||
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
|
||||
Intrinsics.checkNotNullParameter(module, "module");
|
||||
this.storageManager = storageManager;
|
||||
this.module = module;
|
||||
this.packageFragments = storageManager.createMemoizedFunction(new Function1<FqName, PackageFragmentDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses$packageFragments$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final PackageFragmentDescriptor invoke(FqName fqName) {
|
||||
ModuleDescriptor moduleDescriptor;
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
moduleDescriptor = NotFoundClasses.this.module;
|
||||
return new EmptyPackageFragmentDescriptor(moduleDescriptor, fqName);
|
||||
}
|
||||
});
|
||||
this.classes = storageManager.createMemoizedFunction(new Function1<ClassRequest, ClassDescriptor>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.NotFoundClasses$classes$1
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final ClassDescriptor invoke(NotFoundClasses.ClassRequest classRequest) {
|
||||
MemoizedFunctionToNotNull memoizedFunctionToNotNull;
|
||||
DeclarationDescriptor declarationDescriptor;
|
||||
StorageManager storageManager2;
|
||||
Intrinsics.checkNotNullParameter(classRequest, "<name for destructuring parameter 0>");
|
||||
ClassId component1 = classRequest.component1();
|
||||
List<Integer> component2 = classRequest.component2();
|
||||
if (!component1.isLocal()) {
|
||||
ClassId outerClassId = component1.getOuterClassId();
|
||||
if (outerClassId == null || (declarationDescriptor = NotFoundClasses.this.getClass(outerClassId, CollectionsKt.drop(component2, 1))) == null) {
|
||||
memoizedFunctionToNotNull = NotFoundClasses.this.packageFragments;
|
||||
FqName packageFqName = component1.getPackageFqName();
|
||||
Intrinsics.checkNotNullExpressionValue(packageFqName, "getPackageFqName(...)");
|
||||
declarationDescriptor = (ClassOrPackageFragmentDescriptor) memoizedFunctionToNotNull.invoke(packageFqName);
|
||||
}
|
||||
DeclarationDescriptor declarationDescriptor2 = declarationDescriptor;
|
||||
boolean isNestedClass = component1.isNestedClass();
|
||||
storageManager2 = NotFoundClasses.this.storageManager;
|
||||
Name shortClassName = component1.getShortClassName();
|
||||
Intrinsics.checkNotNullExpressionValue(shortClassName, "getShortClassName(...)");
|
||||
Integer num = (Integer) CollectionsKt.firstOrNull((List) component2);
|
||||
return new NotFoundClasses.MockClassDescriptor(storageManager2, declarationDescriptor2, shortClassName, isNestedClass, num != null ? num.intValue() : 0);
|
||||
}
|
||||
throw new UnsupportedOperationException("Unresolved local class: " + component1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final ClassDescriptor getClass(ClassId classId, List<Integer> typeParametersCount) {
|
||||
Intrinsics.checkNotNullParameter(classId, "classId");
|
||||
Intrinsics.checkNotNullParameter(typeParametersCount, "typeParametersCount");
|
||||
return this.classes.invoke(new ClassRequest(classId, typeParametersCount));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PackageFragmentDescriptor extends ClassOrPackageFragmentDescriptor {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ModuleDescriptor getContainingDeclaration();
|
||||
|
||||
FqName getFqName();
|
||||
|
||||
MemberScope getMemberScope();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PackageFragmentProvider {
|
||||
@Deprecated(message = "for usages use #packageFragments(FqName) at final point, for impl use #collectPackageFragments(FqName, MutableCollection<PackageFragmentDescriptor>)")
|
||||
List<PackageFragmentDescriptor> getPackageFragments(FqName fqName);
|
||||
|
||||
Collection<FqName> getSubPackagesOf(FqName fqName, Function1<? super Name, Boolean> function1);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nPackageFragmentProviderImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PackageFragmentProviderImpl.kt\norg/jetbrains/kotlin/descriptors/PackageFragmentProviderImpl\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,42:1\n857#2,2:43\n2624#2,3:45\n766#2:48\n857#2,2:49\n*S KotlinDebug\n*F\n+ 1 PackageFragmentProviderImpl.kt\norg/jetbrains/kotlin/descriptors/PackageFragmentProviderImpl\n*L\n26#1:43,2\n30#1:45,3\n34#1:48\n34#1:49,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PackageFragmentProviderImpl implements PackageFragmentProviderOptimized {
|
||||
private final Collection<PackageFragmentDescriptor> packageFragments;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public PackageFragmentProviderImpl(Collection<? extends PackageFragmentDescriptor> packageFragments) {
|
||||
Intrinsics.checkNotNullParameter(packageFragments, "packageFragments");
|
||||
this.packageFragments = packageFragments;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderOptimized
|
||||
public void collectPackageFragments(FqName fqName, Collection<PackageFragmentDescriptor> packageFragments) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(packageFragments, "packageFragments");
|
||||
for (Object obj : this.packageFragments) {
|
||||
if (Intrinsics.areEqual(((PackageFragmentDescriptor) obj).getFqName(), fqName)) {
|
||||
packageFragments.add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider
|
||||
@Deprecated(message = "for usages use #packageFragments(FqName) at final point, for impl use #collectPackageFragments(FqName, MutableCollection<PackageFragmentDescriptor>)")
|
||||
public List<PackageFragmentDescriptor> getPackageFragments(FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Collection<PackageFragmentDescriptor> collection = this.packageFragments;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (Object obj : collection) {
|
||||
if (Intrinsics.areEqual(((PackageFragmentDescriptor) obj).getFqName(), fqName)) {
|
||||
arrayList.add(obj);
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProvider
|
||||
public Collection<FqName> getSubPackagesOf(final FqName fqName, Function1<? super Name, Boolean> nameFilter) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(nameFilter, "nameFilter");
|
||||
return SequencesKt.toList(SequencesKt.filter(SequencesKt.map(CollectionsKt.asSequence(this.packageFragments), new Function1<PackageFragmentDescriptor, FqName>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderImpl$getSubPackagesOf$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final FqName invoke(PackageFragmentDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return it.getFqName();
|
||||
}
|
||||
}), new Function1<FqName, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderImpl$getSubPackagesOf$2
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(FqName it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(!it.isRoot() && Intrinsics.areEqual(it.parent(), FqName.this));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.PackageFragmentProviderOptimized
|
||||
public boolean isEmpty(FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Collection<PackageFragmentDescriptor> collection = this.packageFragments;
|
||||
if ((collection instanceof Collection) && collection.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
Iterator<T> it = collection.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (Intrinsics.areEqual(((PackageFragmentDescriptor) it.next()).getFqName(), fqName)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PackageFragmentProviderKt {
|
||||
public static final void collectPackageFragmentsOptimizedIfPossible(PackageFragmentProvider packageFragmentProvider, FqName fqName, Collection<PackageFragmentDescriptor> packageFragments) {
|
||||
Intrinsics.checkNotNullParameter(packageFragmentProvider, "<this>");
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
Intrinsics.checkNotNullParameter(packageFragments, "packageFragments");
|
||||
if (packageFragmentProvider instanceof PackageFragmentProviderOptimized) {
|
||||
((PackageFragmentProviderOptimized) packageFragmentProvider).collectPackageFragments(fqName, packageFragments);
|
||||
} else {
|
||||
packageFragments.addAll(packageFragmentProvider.getPackageFragments(fqName));
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean isEmpty(PackageFragmentProvider packageFragmentProvider, FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(packageFragmentProvider, "<this>");
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
return packageFragmentProvider instanceof PackageFragmentProviderOptimized ? ((PackageFragmentProviderOptimized) packageFragmentProvider).isEmpty(fqName) : packageFragments(packageFragmentProvider, fqName).isEmpty();
|
||||
}
|
||||
|
||||
public static final List<PackageFragmentDescriptor> packageFragments(PackageFragmentProvider packageFragmentProvider, FqName fqName) {
|
||||
Intrinsics.checkNotNullParameter(packageFragmentProvider, "<this>");
|
||||
Intrinsics.checkNotNullParameter(fqName, "fqName");
|
||||
ArrayList arrayList = new ArrayList();
|
||||
collectPackageFragmentsOptimizedIfPossible(packageFragmentProvider, fqName, arrayList);
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PackageFragmentProviderOptimized extends PackageFragmentProvider {
|
||||
void collectPackageFragments(FqName fqName, Collection<PackageFragmentDescriptor> collection);
|
||||
|
||||
boolean isEmpty(FqName fqName);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.name.FqName;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PackageViewDescriptor extends DeclarationDescriptor {
|
||||
FqName getFqName();
|
||||
|
||||
List<PackageFragmentDescriptor> getFragments();
|
||||
|
||||
MemberScope getMemberScope();
|
||||
|
||||
ModuleDescriptor getModule();
|
||||
|
||||
boolean isEmpty();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ParameterDescriptor extends ValueDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PossiblyInnerType {
|
||||
private final List<TypeProjection> arguments;
|
||||
private final ClassifierDescriptorWithTypeParameters classifierDescriptor;
|
||||
private final PossiblyInnerType outerType;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public PossiblyInnerType(ClassifierDescriptorWithTypeParameters classifierDescriptor, List<? extends TypeProjection> arguments, PossiblyInnerType possiblyInnerType) {
|
||||
Intrinsics.checkNotNullParameter(classifierDescriptor, "classifierDescriptor");
|
||||
Intrinsics.checkNotNullParameter(arguments, "arguments");
|
||||
this.classifierDescriptor = classifierDescriptor;
|
||||
this.arguments = arguments;
|
||||
this.outerType = possiblyInnerType;
|
||||
}
|
||||
|
||||
public final List<TypeProjection> getArguments() {
|
||||
return this.arguments;
|
||||
}
|
||||
|
||||
public final ClassifierDescriptorWithTypeParameters getClassifierDescriptor() {
|
||||
return this.classifierDescriptor;
|
||||
}
|
||||
|
||||
public final PossiblyInnerType getOuterType() {
|
||||
return this.outerType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PropertyAccessorDescriptor extends VariableAccessorDescriptor {
|
||||
PropertyDescriptor getCorrespondingProperty();
|
||||
|
||||
boolean isDefault();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PropertyDescriptor extends CallableMemberDescriptor, VariableDescriptorWithAccessors {
|
||||
List<PropertyAccessorDescriptor> getAccessors();
|
||||
|
||||
FieldDescriptor getBackingField();
|
||||
|
||||
FieldDescriptor getDelegateField();
|
||||
|
||||
PropertyGetterDescriptor getGetter();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
PropertyDescriptor getOriginal();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
Collection<? extends PropertyDescriptor> getOverriddenDescriptors();
|
||||
|
||||
PropertySetterDescriptor getSetter();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.Substitutable
|
||||
PropertyDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PropertyGetterDescriptor extends PropertyAccessorDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface PropertySetterDescriptor extends PropertyAccessorDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers.ReceiverValue;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ReceiverParameterDescriptor extends ParameterDescriptor {
|
||||
ReceiverValue getValue();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.Substitutable
|
||||
ReceiverParameterDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
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.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope;
|
||||
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.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ScopesHolderForClass<T extends MemberScope> {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(ScopesHolderForClass.class), "scopeForOwnerModule", "getScopeForOwnerModule()Lorg/jetbrains/kotlin/resolve/scopes/MemberScope;"))};
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private final ClassDescriptor classDescriptor;
|
||||
private final KotlinTypeRefiner kotlinTypeRefinerForOwnerModule;
|
||||
private final Function1<KotlinTypeRefiner, T> scopeFactory;
|
||||
private final NotNullLazyValue scopeForOwnerModule$delegate;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final <T extends MemberScope> ScopesHolderForClass<T> create(ClassDescriptor classDescriptor, StorageManager storageManager, KotlinTypeRefiner kotlinTypeRefinerForOwnerModule, Function1<? super KotlinTypeRefiner, ? extends T> scopeFactory) {
|
||||
Intrinsics.checkNotNullParameter(classDescriptor, "classDescriptor");
|
||||
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefinerForOwnerModule, "kotlinTypeRefinerForOwnerModule");
|
||||
Intrinsics.checkNotNullParameter(scopeFactory, "scopeFactory");
|
||||
return new ScopesHolderForClass<>(classDescriptor, storageManager, scopeFactory, kotlinTypeRefinerForOwnerModule, null);
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ ScopesHolderForClass(ClassDescriptor classDescriptor, StorageManager storageManager, Function1 function1, KotlinTypeRefiner kotlinTypeRefiner, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(classDescriptor, storageManager, function1, kotlinTypeRefiner);
|
||||
}
|
||||
|
||||
private final T getScopeForOwnerModule() {
|
||||
return (T) StorageKt.getValue(this.scopeForOwnerModule$delegate, this, (KProperty<?>) $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
public final T getScope(final KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
Intrinsics.checkNotNullParameter(kotlinTypeRefiner, "kotlinTypeRefiner");
|
||||
if (!kotlinTypeRefiner.isRefinementNeededForModule(DescriptorUtilsKt.getModule(this.classDescriptor))) {
|
||||
return getScopeForOwnerModule();
|
||||
}
|
||||
TypeConstructor typeConstructor = this.classDescriptor.getTypeConstructor();
|
||||
Intrinsics.checkNotNullExpressionValue(typeConstructor, "getTypeConstructor(...)");
|
||||
return !kotlinTypeRefiner.isRefinementNeededForTypeConstructor(typeConstructor) ? getScopeForOwnerModule() : (T) kotlinTypeRefiner.getOrPutScopeForClass(this.classDescriptor, new Function0<T>(this) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.ScopesHolderForClass$getScope$1
|
||||
final /* synthetic */ ScopesHolderForClass<T> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
this.this$0 = this;
|
||||
}
|
||||
|
||||
/* JADX WARN: Incorrect return type in method signature: ()TT; */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final MemberScope invoke() {
|
||||
Function1 function1;
|
||||
function1 = ((ScopesHolderForClass) this.this$0).scopeFactory;
|
||||
return (MemberScope) function1.invoke(kotlinTypeRefiner);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private ScopesHolderForClass(ClassDescriptor classDescriptor, StorageManager storageManager, Function1<? super KotlinTypeRefiner, ? extends T> function1, KotlinTypeRefiner kotlinTypeRefiner) {
|
||||
this.classDescriptor = classDescriptor;
|
||||
this.scopeFactory = function1;
|
||||
this.kotlinTypeRefinerForOwnerModule = kotlinTypeRefiner;
|
||||
this.scopeForOwnerModule$delegate = storageManager.createLazyValue(new Function0<T>(this) { // from class: kotlin.reflect.jvm.internal.impl.descriptors.ScopesHolderForClass$scopeForOwnerModule$2
|
||||
final /* synthetic */ ScopesHolderForClass<T> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(0);
|
||||
this.this$0 = this;
|
||||
}
|
||||
|
||||
/* JADX WARN: Incorrect return type in method signature: ()TT; */
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public final MemberScope invoke() {
|
||||
Function1 function12;
|
||||
KotlinTypeRefiner kotlinTypeRefiner2;
|
||||
function12 = ((ScopesHolderForClass) this.this$0).scopeFactory;
|
||||
kotlinTypeRefiner2 = ((ScopesHolderForClass) this.this$0).kotlinTypeRefinerForOwnerModule;
|
||||
return (MemberScope) function12.invoke(kotlinTypeRefiner2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SimpleFunctionDescriptor extends FunctionDescriptor {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor
|
||||
FunctionDescriptor.CopyBuilder<? extends SimpleFunctionDescriptor> newCopyBuilder();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SourceElement {
|
||||
public static final SourceElement NO_SOURCE = new SourceElement() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.SourceElement.1
|
||||
private static /* synthetic */ void $$$reportNull$$$0(int i) {
|
||||
throw new IllegalStateException("@NotNull method kotlin/reflect/jvm/internal/impl/descriptors/SourceElement$1.getContainingFile must not return null");
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.SourceElement
|
||||
public SourceFile getContainingFile() {
|
||||
SourceFile sourceFile = SourceFile.NO_SOURCE_FILE;
|
||||
if (sourceFile == null) {
|
||||
$$$reportNull$$$0(0);
|
||||
}
|
||||
return sourceFile;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "NO_SOURCE";
|
||||
}
|
||||
};
|
||||
|
||||
SourceFile getContainingFile();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SourceFile {
|
||||
public static final SourceFile NO_SOURCE_FILE = new SourceFile() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.SourceFile.1
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.SourceFile
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
String getName();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Substitutable<T extends DeclarationDescriptorNonRoot> {
|
||||
T substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SupertypeLoopChecker {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class EMPTY implements SupertypeLoopChecker {
|
||||
public static final EMPTY INSTANCE = new EMPTY();
|
||||
|
||||
private EMPTY() {
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.SupertypeLoopChecker
|
||||
public Collection<KotlinType> findLoopsInSupertypesAndDisconnect(TypeConstructor currentTypeConstructor, Collection<? extends KotlinType> superTypes, Function1<? super TypeConstructor, ? extends Iterable<? extends KotlinType>> neighbors, Function1<? super KotlinType, Unit> reportLoop) {
|
||||
Intrinsics.checkNotNullParameter(currentTypeConstructor, "currentTypeConstructor");
|
||||
Intrinsics.checkNotNullParameter(superTypes, "superTypes");
|
||||
Intrinsics.checkNotNullParameter(neighbors, "neighbors");
|
||||
Intrinsics.checkNotNullParameter(reportLoop, "reportLoop");
|
||||
return superTypes;
|
||||
}
|
||||
}
|
||||
|
||||
Collection<KotlinType> findLoopsInSupertypesAndDisconnect(TypeConstructor typeConstructor, Collection<? extends KotlinType> collection, Function1<? super TypeConstructor, ? extends Iterable<? extends KotlinType>> function1, Function1<? super KotlinType, Unit> function12);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.types.SimpleType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface TypeAliasDescriptor extends ClassifierDescriptorWithTypeParameters {
|
||||
ClassDescriptor getClassDescriptor();
|
||||
|
||||
SimpleType getExpandedType();
|
||||
|
||||
SimpleType getUnderlyingType();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.reflect.jvm.internal.impl.storage.StorageManager;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.Variance;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.TypeParameterMarker;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface TypeParameterDescriptor extends ClassifierDescriptor, TypeParameterMarker {
|
||||
int getIndex();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
TypeParameterDescriptor getOriginal();
|
||||
|
||||
StorageManager getStorageManager();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ClassifierDescriptor
|
||||
TypeConstructor getTypeConstructor();
|
||||
|
||||
List<KotlinType> getUpperBounds();
|
||||
|
||||
Variance getVariance();
|
||||
|
||||
boolean isCapturedFromOuterDeclaration();
|
||||
|
||||
boolean isReified();
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.DescriptorUtils;
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil.DescriptorUtilsKt;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeConstructor;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeProjection;
|
||||
import kotlin.reflect.jvm.internal.impl.types.error.ErrorUtils;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@SourceDebugExtension({"SMAP\ntypeParameterUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 typeParameterUtils.kt\norg/jetbrains/kotlin/descriptors/TypeParameterUtilsKt\n+ 2 addToStdlib.kt\norg/jetbrains/kotlin/utils/addToStdlib/AddToStdlibKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,100:1\n15#2,2:101\n1549#3:103\n1620#3,3:104\n*S KotlinDebug\n*F\n+ 1 typeParameterUtils.kt\norg/jetbrains/kotlin/descriptors/TypeParameterUtilsKt\n*L\n37#1:101,2\n42#1:103\n42#1:104,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class TypeParameterUtilsKt {
|
||||
public static final PossiblyInnerType buildPossiblyInnerType(KotlinType kotlinType) {
|
||||
Intrinsics.checkNotNullParameter(kotlinType, "<this>");
|
||||
ClassifierDescriptor mo1394getDeclarationDescriptor = kotlinType.getConstructor().mo1394getDeclarationDescriptor();
|
||||
return buildPossiblyInnerType(kotlinType, mo1394getDeclarationDescriptor instanceof ClassifierDescriptorWithTypeParameters ? (ClassifierDescriptorWithTypeParameters) mo1394getDeclarationDescriptor : null, 0);
|
||||
}
|
||||
|
||||
private static final CapturedTypeParameterDescriptor capturedCopyForInnerDeclaration(TypeParameterDescriptor typeParameterDescriptor, DeclarationDescriptor declarationDescriptor, int i) {
|
||||
return new CapturedTypeParameterDescriptor(typeParameterDescriptor, declarationDescriptor, i);
|
||||
}
|
||||
|
||||
public static final List<TypeParameterDescriptor> computeConstructorTypeParameters(ClassifierDescriptorWithTypeParameters classifierDescriptorWithTypeParameters) {
|
||||
List<TypeParameterDescriptor> list;
|
||||
DeclarationDescriptor declarationDescriptor;
|
||||
int collectionSizeOrDefault;
|
||||
TypeConstructor typeConstructor;
|
||||
Intrinsics.checkNotNullParameter(classifierDescriptorWithTypeParameters, "<this>");
|
||||
List<TypeParameterDescriptor> declaredTypeParameters = classifierDescriptorWithTypeParameters.getDeclaredTypeParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(declaredTypeParameters, "getDeclaredTypeParameters(...)");
|
||||
if (!classifierDescriptorWithTypeParameters.isInner() && !(classifierDescriptorWithTypeParameters.getContainingDeclaration() instanceof CallableDescriptor)) {
|
||||
return declaredTypeParameters;
|
||||
}
|
||||
List list2 = SequencesKt.toList(SequencesKt.flatMap(SequencesKt.filter(SequencesKt.takeWhile(DescriptorUtilsKt.getParents(classifierDescriptorWithTypeParameters), new Function1<DeclarationDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterUtilsKt$computeConstructorTypeParameters$parametersFromContainingFunctions$1
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(DeclarationDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(it instanceof CallableDescriptor);
|
||||
}
|
||||
}), new Function1<DeclarationDescriptor, Boolean>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterUtilsKt$computeConstructorTypeParameters$parametersFromContainingFunctions$2
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Boolean invoke(DeclarationDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
return Boolean.valueOf(!(it instanceof ConstructorDescriptor));
|
||||
}
|
||||
}), new Function1<DeclarationDescriptor, Sequence<? extends TypeParameterDescriptor>>() { // from class: kotlin.reflect.jvm.internal.impl.descriptors.TypeParameterUtilsKt$computeConstructorTypeParameters$parametersFromContainingFunctions$3
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public final Sequence<TypeParameterDescriptor> invoke(DeclarationDescriptor it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
List<TypeParameterDescriptor> typeParameters = ((CallableDescriptor) it).getTypeParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(typeParameters, "getTypeParameters(...)");
|
||||
return CollectionsKt.asSequence(typeParameters);
|
||||
}
|
||||
}));
|
||||
Iterator<DeclarationDescriptor> it = DescriptorUtilsKt.getParents(classifierDescriptorWithTypeParameters).iterator();
|
||||
while (true) {
|
||||
list = null;
|
||||
if (!it.hasNext()) {
|
||||
declarationDescriptor = null;
|
||||
break;
|
||||
}
|
||||
declarationDescriptor = it.next();
|
||||
if (declarationDescriptor instanceof ClassDescriptor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor;
|
||||
if (classDescriptor != null && (typeConstructor = classDescriptor.getTypeConstructor()) != null) {
|
||||
list = typeConstructor.getParameters();
|
||||
}
|
||||
if (list == null) {
|
||||
list = CollectionsKt.emptyList();
|
||||
}
|
||||
if (list2.isEmpty() && list.isEmpty()) {
|
||||
List<TypeParameterDescriptor> declaredTypeParameters2 = classifierDescriptorWithTypeParameters.getDeclaredTypeParameters();
|
||||
Intrinsics.checkNotNullExpressionValue(declaredTypeParameters2, "getDeclaredTypeParameters(...)");
|
||||
return declaredTypeParameters2;
|
||||
}
|
||||
List<TypeParameterDescriptor> plus = CollectionsKt.plus((Collection) list2, (Iterable) list);
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(plus, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
for (TypeParameterDescriptor typeParameterDescriptor : plus) {
|
||||
Intrinsics.checkNotNull(typeParameterDescriptor);
|
||||
arrayList.add(capturedCopyForInnerDeclaration(typeParameterDescriptor, classifierDescriptorWithTypeParameters, declaredTypeParameters.size()));
|
||||
}
|
||||
return CollectionsKt.plus((Collection) declaredTypeParameters, (Iterable) arrayList);
|
||||
}
|
||||
|
||||
private static final PossiblyInnerType buildPossiblyInnerType(KotlinType kotlinType, ClassifierDescriptorWithTypeParameters classifierDescriptorWithTypeParameters, int i) {
|
||||
if (classifierDescriptorWithTypeParameters == null || ErrorUtils.isError(classifierDescriptorWithTypeParameters)) {
|
||||
return null;
|
||||
}
|
||||
int size = classifierDescriptorWithTypeParameters.getDeclaredTypeParameters().size() + i;
|
||||
if (!classifierDescriptorWithTypeParameters.isInner()) {
|
||||
if (size != kotlinType.getArguments().size()) {
|
||||
DescriptorUtils.isLocal(classifierDescriptorWithTypeParameters);
|
||||
}
|
||||
return new PossiblyInnerType(classifierDescriptorWithTypeParameters, kotlinType.getArguments().subList(i, kotlinType.getArguments().size()), null);
|
||||
}
|
||||
List<TypeProjection> subList = kotlinType.getArguments().subList(i, size);
|
||||
DeclarationDescriptor containingDeclaration = classifierDescriptorWithTypeParameters.getContainingDeclaration();
|
||||
return new PossiblyInnerType(classifierDescriptorWithTypeParameters, subList, buildPossiblyInnerType(kotlinType, containingDeclaration instanceof ClassifierDescriptorWithTypeParameters ? (ClassifierDescriptorWithTypeParameters) containingDeclaration : null, size));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.Pair;
|
||||
import kotlin.TuplesKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.model.SimpleTypeMarker;
|
||||
|
||||
@SourceDebugExtension({"SMAP\nValueClassRepresentation.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ValueClassRepresentation.kt\norg/jetbrains/kotlin/descriptors/ValueClassRepresentation\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,50:1\n1549#2:51\n1620#2,3:52\n*S KotlinDebug\n*F\n+ 1 ValueClassRepresentation.kt\norg/jetbrains/kotlin/descriptors/ValueClassRepresentation\n*L\n22#1:51\n22#1:52,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ValueClassRepresentation<Type extends SimpleTypeMarker> {
|
||||
public /* synthetic */ ValueClassRepresentation(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public abstract boolean containsPropertyWithName(Name name);
|
||||
|
||||
public abstract List<Pair<Name, Type>> getUnderlyingPropertyNamesToTypes();
|
||||
|
||||
public final <Other extends SimpleTypeMarker> ValueClassRepresentation<Other> mapUnderlyingType(Function1<? super Type, ? extends Other> transform) {
|
||||
int collectionSizeOrDefault;
|
||||
Intrinsics.checkNotNullParameter(transform, "transform");
|
||||
if (this instanceof InlineClassRepresentation) {
|
||||
InlineClassRepresentation inlineClassRepresentation = (InlineClassRepresentation) this;
|
||||
return new InlineClassRepresentation(inlineClassRepresentation.getUnderlyingPropertyName(), transform.invoke(inlineClassRepresentation.getUnderlyingType()));
|
||||
}
|
||||
if (!(this instanceof MultiFieldValueClassRepresentation)) {
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
List<Pair<Name, Type>> underlyingPropertyNamesToTypes = getUnderlyingPropertyNamesToTypes();
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(underlyingPropertyNamesToTypes, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator<T> it = underlyingPropertyNamesToTypes.iterator();
|
||||
while (it.hasNext()) {
|
||||
Pair pair = (Pair) it.next();
|
||||
arrayList.add(TuplesKt.to((Name) pair.component1(), transform.invoke((SimpleTypeMarker) pair.component2())));
|
||||
}
|
||||
return new MultiFieldValueClassRepresentation(arrayList);
|
||||
}
|
||||
|
||||
private ValueClassRepresentation() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ValueDescriptor extends CallableDescriptor {
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
DeclarationDescriptor getContainingDeclaration();
|
||||
|
||||
KotlinType getType();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.reflect.jvm.internal.impl.name.Name;
|
||||
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ValueParameterDescriptor extends ParameterDescriptor, VariableDescriptor {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class DefaultImpls {
|
||||
public static boolean isLateInit(ValueParameterDescriptor valueParameterDescriptor) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ValueParameterDescriptor copy(CallableDescriptor callableDescriptor, Name name, int i);
|
||||
|
||||
boolean declaresDefaultValue();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.ValueDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptorNonRoot, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
CallableDescriptor getContainingDeclaration();
|
||||
|
||||
int getIndex();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor, kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor
|
||||
ValueParameterDescriptor getOriginal();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.CallableDescriptor
|
||||
Collection<ValueParameterDescriptor> getOverriddenDescriptors();
|
||||
|
||||
KotlinType getVarargElementType();
|
||||
|
||||
boolean isCrossinline();
|
||||
|
||||
boolean isNoinline();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface VariableAccessorDescriptor extends FunctionDescriptor {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kotlin.reflect.jvm.internal.impl.descriptors;
|
||||
|
||||
import kotlin.reflect.jvm.internal.impl.resolve.constants.ConstantValue;
|
||||
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface VariableDescriptor extends ValueDescriptor {
|
||||
/* renamed from: getCompileTimeInitializer */
|
||||
ConstantValue<?> mo1390getCompileTimeInitializer();
|
||||
|
||||
boolean isConst();
|
||||
|
||||
boolean isLateInit();
|
||||
|
||||
boolean isVar();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.descriptors.Substitutable
|
||||
VariableDescriptor substitute(TypeSubstitutor typeSubstitutor);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user