249 lines
10 KiB
Java
249 lines
10 KiB
Java
package d0.z.d;
|
|
|
|
import d0.e0.c;
|
|
import d0.g0.w;
|
|
import d0.t.g0;
|
|
import d0.t.h0;
|
|
import d0.t.n;
|
|
import d0.t.o;
|
|
import d0.z.c.b;
|
|
import d0.z.c.d;
|
|
import d0.z.c.e;
|
|
import d0.z.c.g;
|
|
import java.lang.reflect.Constructor;
|
|
import java.lang.reflect.Method;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.HashMap;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import kotlin.Pair;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function10;
|
|
import kotlin.jvm.functions.Function11;
|
|
import kotlin.jvm.functions.Function12;
|
|
import kotlin.jvm.functions.Function13;
|
|
import kotlin.jvm.functions.Function14;
|
|
import kotlin.jvm.functions.Function15;
|
|
import kotlin.jvm.functions.Function16;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.functions.Function3;
|
|
import kotlin.jvm.functions.Function4;
|
|
import kotlin.jvm.functions.Function5;
|
|
import kotlin.jvm.functions.Function6;
|
|
import kotlin.jvm.functions.Function7;
|
|
import kotlin.jvm.functions.Function9;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: ClassReference.kt */
|
|
public final class f implements c<Object>, e {
|
|
public static final Map<Class<? extends d0.c<?>>, Integer> i;
|
|
public static final HashMap<String, String> j;
|
|
public static final HashMap<String, String> k;
|
|
public static final HashMap<String, String> l;
|
|
public static final Map<String, String> m;
|
|
public static final a n = new a(null);
|
|
public final Class<?> o;
|
|
|
|
/* compiled from: ClassReference.kt */
|
|
public static final class a {
|
|
public a(DefaultConstructorMarker defaultConstructorMarker) {
|
|
}
|
|
|
|
public final String getClassQualifiedName(Class<?> cls) {
|
|
String str;
|
|
m.checkNotNullParameter(cls, "jClass");
|
|
String str2 = null;
|
|
if (cls.isAnonymousClass() || cls.isLocalClass()) {
|
|
return null;
|
|
}
|
|
if (cls.isArray()) {
|
|
Class<?> componentType = cls.getComponentType();
|
|
m.checkNotNullExpressionValue(componentType, "componentType");
|
|
if (componentType.isPrimitive() && (str = (String) f.access$getClassFqNames$cp().get(componentType.getName())) != null) {
|
|
str2 = c.d.b.a.a.s(str, "Array");
|
|
}
|
|
return str2 != null ? str2 : "kotlin.Array";
|
|
}
|
|
String str3 = (String) f.access$getClassFqNames$cp().get(cls.getName());
|
|
return str3 != null ? str3 : cls.getCanonicalName();
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:8:0x0040, code lost:
|
|
if (r1 != null) goto L_0x0066;
|
|
*/
|
|
public final String getClassSimpleName(Class<?> cls) {
|
|
String str;
|
|
String str2;
|
|
m.checkNotNullParameter(cls, "jClass");
|
|
String str3 = null;
|
|
if (!cls.isAnonymousClass()) {
|
|
if (cls.isLocalClass()) {
|
|
String simpleName = cls.getSimpleName();
|
|
Method enclosingMethod = cls.getEnclosingMethod();
|
|
if (enclosingMethod != null) {
|
|
m.checkNotNullExpressionValue(simpleName, "name");
|
|
str2 = w.substringAfter$default(simpleName, enclosingMethod.getName() + "$", (String) null, 2, (Object) null);
|
|
}
|
|
Constructor<?> enclosingConstructor = cls.getEnclosingConstructor();
|
|
if (enclosingConstructor != null) {
|
|
m.checkNotNullExpressionValue(simpleName, "name");
|
|
str2 = w.substringAfter$default(simpleName, enclosingConstructor.getName() + "$", (String) null, 2, (Object) null);
|
|
} else {
|
|
str2 = null;
|
|
}
|
|
if (str2 != null) {
|
|
return str2;
|
|
}
|
|
m.checkNotNullExpressionValue(simpleName, "name");
|
|
return w.substringAfter$default(simpleName, '$', (String) null, 2, (Object) null);
|
|
} else if (cls.isArray()) {
|
|
Class<?> componentType = cls.getComponentType();
|
|
m.checkNotNullExpressionValue(componentType, "componentType");
|
|
if (componentType.isPrimitive() && (str = (String) f.access$getSimpleNames$cp().get(componentType.getName())) != null) {
|
|
str3 = c.d.b.a.a.s(str, "Array");
|
|
}
|
|
if (str3 == null) {
|
|
return "Array";
|
|
}
|
|
} else {
|
|
String str4 = (String) f.access$getSimpleNames$cp().get(cls.getName());
|
|
return str4 != null ? str4 : cls.getSimpleName();
|
|
}
|
|
}
|
|
return str3;
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r3v10, resolved type: java.util.HashMap<java.lang.String, java.lang.String> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
static {
|
|
int i2 = 0;
|
|
List listOf = n.listOf((Object[]) new Class[]{Function0.class, Function1.class, Function2.class, Function3.class, Function4.class, Function5.class, Function6.class, Function7.class, g.class, Function9.class, Function10.class, Function11.class, Function12.class, Function13.class, Function14.class, Function15.class, Function16.class, d0.z.c.a.class, b.class, d0.z.c.c.class, d.class, e.class, d0.z.c.f.class});
|
|
ArrayList arrayList = new ArrayList(o.collectionSizeOrDefault(listOf, 10));
|
|
for (Object obj : listOf) {
|
|
int i3 = i2 + 1;
|
|
if (i2 < 0) {
|
|
n.throwIndexOverflow();
|
|
}
|
|
arrayList.add(d0.o.to((Class) obj, Integer.valueOf(i2)));
|
|
i2 = i3;
|
|
}
|
|
i = h0.toMap(arrayList);
|
|
HashMap<String, String> hashMap = new HashMap<>();
|
|
hashMap.put("boolean", "kotlin.Boolean");
|
|
hashMap.put("char", "kotlin.Char");
|
|
hashMap.put("byte", "kotlin.Byte");
|
|
hashMap.put("short", "kotlin.Short");
|
|
hashMap.put("int", "kotlin.Int");
|
|
hashMap.put("float", "kotlin.Float");
|
|
hashMap.put("long", "kotlin.Long");
|
|
hashMap.put("double", "kotlin.Double");
|
|
j = hashMap;
|
|
HashMap<String, String> hashMap2 = new HashMap<>();
|
|
hashMap2.put("java.lang.Boolean", "kotlin.Boolean");
|
|
hashMap2.put("java.lang.Character", "kotlin.Char");
|
|
hashMap2.put("java.lang.Byte", "kotlin.Byte");
|
|
hashMap2.put("java.lang.Short", "kotlin.Short");
|
|
hashMap2.put("java.lang.Integer", "kotlin.Int");
|
|
hashMap2.put("java.lang.Float", "kotlin.Float");
|
|
hashMap2.put("java.lang.Long", "kotlin.Long");
|
|
hashMap2.put("java.lang.Double", "kotlin.Double");
|
|
k = hashMap2;
|
|
HashMap<String, String> hashMap3 = new HashMap<>();
|
|
hashMap3.put("java.lang.Object", "kotlin.Any");
|
|
hashMap3.put("java.lang.String", "kotlin.String");
|
|
hashMap3.put("java.lang.CharSequence", "kotlin.CharSequence");
|
|
hashMap3.put("java.lang.Throwable", "kotlin.Throwable");
|
|
hashMap3.put("java.lang.Cloneable", "kotlin.Cloneable");
|
|
hashMap3.put("java.lang.Number", "kotlin.Number");
|
|
hashMap3.put("java.lang.Comparable", "kotlin.Comparable");
|
|
hashMap3.put("java.lang.Enum", "kotlin.Enum");
|
|
hashMap3.put("java.lang.annotation.Annotation", "kotlin.Annotation");
|
|
hashMap3.put("java.lang.Iterable", "kotlin.collections.Iterable");
|
|
hashMap3.put("java.util.Iterator", "kotlin.collections.Iterator");
|
|
hashMap3.put("java.util.Collection", "kotlin.collections.Collection");
|
|
hashMap3.put("java.util.List", "kotlin.collections.List");
|
|
hashMap3.put("java.util.Set", "kotlin.collections.Set");
|
|
hashMap3.put("java.util.ListIterator", "kotlin.collections.ListIterator");
|
|
hashMap3.put("java.util.Map", "kotlin.collections.Map");
|
|
hashMap3.put("java.util.Map$Entry", "kotlin.collections.Map.Entry");
|
|
hashMap3.put("kotlin.jvm.internal.StringCompanionObject", "kotlin.String.Companion");
|
|
hashMap3.put("kotlin.jvm.internal.EnumCompanionObject", "kotlin.Enum.Companion");
|
|
hashMap3.putAll(hashMap);
|
|
hashMap3.putAll(hashMap2);
|
|
Collection<String> values = hashMap.values();
|
|
m.checkNotNullExpressionValue(values, "primitiveFqNames.values");
|
|
for (String str : values) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("kotlin.jvm.internal.");
|
|
m.checkNotNullExpressionValue(str, "kotlinName");
|
|
sb.append(w.substringAfterLast$default(str, '.', null, 2, null));
|
|
sb.append("CompanionObject");
|
|
Pair pair = d0.o.to(sb.toString(), str + ".Companion");
|
|
hashMap3.put(pair.getFirst(), pair.getSecond());
|
|
}
|
|
for (Map.Entry<Class<? extends d0.c<?>>, Integer> entry : i.entrySet()) {
|
|
int intValue = entry.getValue().intValue();
|
|
hashMap3.put(entry.getKey().getName(), "kotlin.Function" + intValue);
|
|
}
|
|
l = hashMap3;
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap(g0.mapCapacity(hashMap3.size()));
|
|
for (Map.Entry entry2 : hashMap3.entrySet()) {
|
|
linkedHashMap.put(entry2.getKey(), w.substringAfterLast$default((String) entry2.getValue(), '.', null, 2, null));
|
|
}
|
|
m = linkedHashMap;
|
|
}
|
|
|
|
public f(Class<?> cls) {
|
|
m.checkNotNullParameter(cls, "jClass");
|
|
this.o = cls;
|
|
}
|
|
|
|
public static final /* synthetic */ HashMap access$getClassFqNames$cp() {
|
|
return l;
|
|
}
|
|
|
|
public static final /* synthetic */ Map access$getSimpleNames$cp() {
|
|
return m;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
return (obj instanceof f) && m.areEqual(d0.z.a.getJavaObjectType(this), d0.z.a.getJavaObjectType((c) obj));
|
|
}
|
|
|
|
@Override // d0.z.d.e
|
|
public Class<?> getJClass() {
|
|
return this.o;
|
|
}
|
|
|
|
@Override // d0.e0.c
|
|
public Object getObjectInstance() {
|
|
throw new d0.z.b();
|
|
}
|
|
|
|
@Override // d0.e0.c
|
|
public String getQualifiedName() {
|
|
return n.getClassQualifiedName(getJClass());
|
|
}
|
|
|
|
@Override // d0.e0.c
|
|
public List<c<? extends Object>> getSealedSubclasses() {
|
|
throw new d0.z.b();
|
|
}
|
|
|
|
@Override // d0.e0.c
|
|
public String getSimpleName() {
|
|
return n.getClassSimpleName(getJClass());
|
|
}
|
|
|
|
public int hashCode() {
|
|
return d0.z.a.getJavaObjectType(this).hashCode();
|
|
}
|
|
|
|
public String toString() {
|
|
return getJClass().toString() + " (Kotlin reflection is not available)";
|
|
}
|
|
}
|