CrackMe.apk
Download file
package kotlin.reflect.jvm.internal.impl.resolve.scopes;
import androidx.autofill.HintConstants;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference1Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.KProperty;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.DeclarationDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.FunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.PropertyDescriptor;
import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor;
import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.resolve.OverridingUtil;
import kotlin.reflect.jvm.internal.impl.resolve.scopes.ResolutionScope;
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.utils.SmartList;
/* compiled from: GivenFunctionsMemberScope.kt */
public abstract class GivenFunctionsMemberScope extends MemberScopeImpl {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(GivenFunctionsMemberScope.class), "allDescriptors", "getAllDescriptors()Ljava/util/List;"))};
private final NotNullLazyValue allDescriptors$delegate;
private final ClassDescriptor containingClass;
/* access modifiers changed from: protected */
public abstract List<FunctionDescriptor> computeDeclaredFunctions();
/* access modifiers changed from: protected */
public final ClassDescriptor getContainingClass() {
return this.containingClass;
}
public GivenFunctionsMemberScope(StorageManager storageManager, ClassDescriptor classDescriptor) {
Intrinsics.checkNotNullParameter(storageManager, "storageManager");
Intrinsics.checkNotNullParameter(classDescriptor, "containingClass");
this.containingClass = classDescriptor;
this.allDescriptors$delegate = storageManager.createLazyValue(new GivenFunctionsMemberScope$allDescriptors$2(this));
}
private final List<DeclarationDescriptor> getAllDescriptors() {
return (List) StorageKt.getValue(this.allDescriptors$delegate, (Object) this, (KProperty<?>) $$delegatedProperties[0]);
}
public Collection<DeclarationDescriptor> getContributedDescriptors(DescriptorKindFilter descriptorKindFilter, Function1<? super Name, Boolean> function1) {
Intrinsics.checkNotNullParameter(descriptorKindFilter, "kindFilter");
Intrinsics.checkNotNullParameter(function1, "nameFilter");
if (!descriptorKindFilter.acceptsKinds(DescriptorKindFilter.CALLABLES.getKindMask())) {
return CollectionsKt.emptyList();
}
return getAllDescriptors();
}
public Collection<SimpleFunctionDescriptor> getContributedFunctions(Name name, LookupLocation lookupLocation) {
Intrinsics.checkNotNullParameter(name, HintConstants.AUTOFILL_HINT_NAME);
Intrinsics.checkNotNullParameter(lookupLocation, "location");
Collection<SimpleFunctionDescriptor> smartList = new SmartList<>();
for (Object next : getAllDescriptors()) {
if ((next instanceof SimpleFunctionDescriptor) && Intrinsics.areEqual((Object) ((SimpleFunctionDescriptor) next).getName(), (Object) name)) {
smartList.add(next);
}
}
return smartList;
}
public Collection<PropertyDescriptor> getContributedVariables(Name name, LookupLocation lookupLocation) {
Intrinsics.checkNotNullParameter(name, HintConstants.AUTOFILL_HINT_NAME);
Intrinsics.checkNotNullParameter(lookupLocation, "location");
Collection<PropertyDescriptor> smartList = new SmartList<>();
for (Object next : getAllDescriptors()) {
if ((next instanceof PropertyDescriptor) && Intrinsics.areEqual((Object) ((PropertyDescriptor) next).getName(), (Object) name)) {
smartList.add(next);
}
}
return smartList;
}
/* access modifiers changed from: private */
public final List<DeclarationDescriptor> createFakeOverrides(List<? extends FunctionDescriptor> list) {
List list2;
ArrayList arrayList = new ArrayList(3);
Collection<KotlinType> supertypes = this.containingClass.getTypeConstructor().getSupertypes();
Intrinsics.checkNotNullExpressionValue(supertypes, "containingClass.typeConstructor.supertypes");
Collection arrayList2 = new ArrayList();
for (KotlinType memberScope : supertypes) {
CollectionsKt.addAll(arrayList2, ResolutionScope.DefaultImpls.getContributedDescriptors$default(memberScope.getMemberScope(), (DescriptorKindFilter) null, (Function1) null, 3, (Object) null));
}
Collection arrayList3 = new ArrayList();
for (Object next : (List) arrayList2) {
if (next instanceof CallableMemberDescriptor) {
arrayList3.add(next);
}
}
Map linkedHashMap = new LinkedHashMap();
for (Object next2 : (List) arrayList3) {
Name name = ((CallableMemberDescriptor) next2).getName();
Object obj = linkedHashMap.get(name);
if (obj == null) {
obj = new ArrayList();
linkedHashMap.put(name, obj);
}
((List) obj).add(next2);
}
for (Map.Entry entry : linkedHashMap.entrySet()) {
Name name2 = (Name) entry.getKey();
Map linkedHashMap2 = new LinkedHashMap();
for (Object next3 : (List) entry.getValue()) {
Boolean valueOf = Boolean.valueOf(((CallableMemberDescriptor) next3) instanceof FunctionDescriptor);
Object obj2 = linkedHashMap2.get(valueOf);
if (obj2 == null) {
obj2 = new ArrayList();
linkedHashMap2.put(valueOf, obj2);
}
((List) obj2).add(next3);
}
for (Map.Entry entry2 : linkedHashMap2.entrySet()) {
boolean booleanValue = ((Boolean) entry2.getKey()).booleanValue();
OverridingUtil overridingUtil = OverridingUtil.DEFAULT;
Collection collection = (List) entry2.getValue();
if (booleanValue) {
Collection arrayList4 = new ArrayList();
for (Object next4 : list) {
if (Intrinsics.areEqual((Object) ((FunctionDescriptor) next4).getName(), (Object) name2)) {
arrayList4.add(next4);
}
}
list2 = (List) arrayList4;
} else {
list2 = CollectionsKt.emptyList();
}
overridingUtil.generateOverridesInFunctionGroup(name2, collection, list2, this.containingClass, new GivenFunctionsMemberScope$createFakeOverrides$4(arrayList, this));
}
}
return kotlin.reflect.jvm.internal.impl.utils.CollectionsKt.compact(arrayList);
}
}
Download file