apkfuckery/com.discord/smali_classes2/kotlin/jvm/internal/ac.smali
2019-10-17 05:51:45 +02:00

492 lines
9.5 KiB
Smali

.class public Lkotlin/jvm/internal/ac;
.super Ljava/lang/Object;
.source "TypeIntrinsics.java"
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static asMutableCollection(Ljava/lang/Object;)Ljava/util/Collection;
.locals 1
instance-of v0, p0, Lkotlin/jvm/internal/a/a;
if-eqz v0, :cond_0
instance-of v0, p0, Lkotlin/jvm/internal/a/b;
if-nez v0, :cond_0
const-string v0, "kotlin.collections.MutableCollection"
invoke-static {p0, v0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->castToCollection(Ljava/lang/Object;)Ljava/util/Collection;
move-result-object p0
return-object p0
.end method
.method public static asMutableIterable(Ljava/lang/Object;)Ljava/lang/Iterable;
.locals 1
instance-of v0, p0, Lkotlin/jvm/internal/a/a;
if-eqz v0, :cond_0
instance-of v0, p0, Lkotlin/jvm/internal/a/c;
if-nez v0, :cond_0
const-string v0, "kotlin.collections.MutableIterable"
invoke-static {p0, v0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->castToIterable(Ljava/lang/Object;)Ljava/lang/Iterable;
move-result-object p0
return-object p0
.end method
.method public static asMutableMap(Ljava/lang/Object;)Ljava/util/Map;
.locals 1
instance-of v0, p0, Lkotlin/jvm/internal/a/a;
if-eqz v0, :cond_0
instance-of v0, p0, Lkotlin/jvm/internal/a/g;
if-nez v0, :cond_0
const-string v0, "kotlin.collections.MutableMap"
invoke-static {p0, v0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->castToMap(Ljava/lang/Object;)Ljava/util/Map;
move-result-object p0
return-object p0
.end method
.method public static beforeCheckcastToFunctionOfArity(Ljava/lang/Object;I)Ljava/lang/Object;
.locals 1
if-eqz p0, :cond_0
invoke-static {p0, p1}, Lkotlin/jvm/internal/ac;->isFunctionOfArity(Ljava/lang/Object;I)Z
move-result v0
if-nez v0, :cond_0
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p1
const-string v0, "kotlin.jvm.functions.Function"
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-static {p0, p1}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
return-object p0
.end method
.method public static castToCollection(Ljava/lang/Object;)Ljava/util/Collection;
.locals 0
:try_start_0
check-cast p0, Ljava/util/Collection;
:try_end_0
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/ClassCastException;)Ljava/lang/ClassCastException;
move-result-object p0
throw p0
.end method
.method public static castToIterable(Ljava/lang/Object;)Ljava/lang/Iterable;
.locals 0
:try_start_0
check-cast p0, Ljava/lang/Iterable;
:try_end_0
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/ClassCastException;)Ljava/lang/ClassCastException;
move-result-object p0
throw p0
.end method
.method public static castToMap(Ljava/lang/Object;)Ljava/util/Map;
.locals 0
:try_start_0
check-cast p0, Ljava/util/Map;
:try_end_0
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/ClassCastException;)Ljava/lang/ClassCastException;
move-result-object p0
throw p0
.end method
.method public static getFunctionArity(Ljava/lang/Object;)I
.locals 1
instance-of v0, p0, Lkotlin/jvm/internal/i;
if-eqz v0, :cond_0
check-cast p0, Lkotlin/jvm/internal/i;
invoke-interface {p0}, Lkotlin/jvm/internal/i;->getArity()I
move-result p0
return p0
:cond_0
instance-of v0, p0, Lkotlin/jvm/functions/Function0;
if-eqz v0, :cond_1
const/4 p0, 0x0
return p0
:cond_1
instance-of v0, p0, Lkotlin/jvm/functions/Function1;
if-eqz v0, :cond_2
const/4 p0, 0x1
return p0
:cond_2
instance-of v0, p0, Lkotlin/jvm/functions/Function2;
if-eqz v0, :cond_3
const/4 p0, 0x2
return p0
:cond_3
instance-of v0, p0, Lkotlin/jvm/functions/Function3;
if-eqz v0, :cond_4
const/4 p0, 0x3
return p0
:cond_4
instance-of v0, p0, Lkotlin/jvm/functions/Function4;
if-eqz v0, :cond_5
const/4 p0, 0x4
return p0
:cond_5
instance-of v0, p0, Lkotlin/jvm/functions/Function5;
if-eqz v0, :cond_6
const/4 p0, 0x5
return p0
:cond_6
instance-of v0, p0, Lkotlin/jvm/functions/Function6;
if-eqz v0, :cond_7
const/4 p0, 0x6
return p0
:cond_7
instance-of v0, p0, Lkotlin/jvm/functions/Function7;
if-eqz v0, :cond_8
const/4 p0, 0x7
return p0
:cond_8
instance-of v0, p0, Lkotlin/jvm/functions/n;
if-eqz v0, :cond_9
const/16 p0, 0x8
return p0
:cond_9
instance-of v0, p0, Lkotlin/jvm/functions/Function9;
if-eqz v0, :cond_a
const/16 p0, 0x9
return p0
:cond_a
instance-of v0, p0, Lkotlin/jvm/functions/a;
if-eqz v0, :cond_b
const/16 p0, 0xa
return p0
:cond_b
instance-of v0, p0, Lkotlin/jvm/functions/b;
if-eqz v0, :cond_c
const/16 p0, 0xb
return p0
:cond_c
instance-of v0, p0, Lkotlin/jvm/functions/c;
if-eqz v0, :cond_d
const/16 p0, 0xc
return p0
:cond_d
instance-of v0, p0, Lkotlin/jvm/functions/d;
if-eqz v0, :cond_e
const/16 p0, 0xd
return p0
:cond_e
instance-of v0, p0, Lkotlin/jvm/functions/e;
if-eqz v0, :cond_f
const/16 p0, 0xe
return p0
:cond_f
instance-of v0, p0, Lkotlin/jvm/functions/f;
if-eqz v0, :cond_10
const/16 p0, 0xf
return p0
:cond_10
instance-of v0, p0, Lkotlin/jvm/functions/g;
if-eqz v0, :cond_11
const/16 p0, 0x10
return p0
:cond_11
instance-of v0, p0, Lkotlin/jvm/functions/h;
if-eqz v0, :cond_12
const/16 p0, 0x11
return p0
:cond_12
instance-of v0, p0, Lkotlin/jvm/functions/i;
if-eqz v0, :cond_13
const/16 p0, 0x12
return p0
:cond_13
instance-of v0, p0, Lkotlin/jvm/functions/j;
if-eqz v0, :cond_14
const/16 p0, 0x13
return p0
:cond_14
instance-of v0, p0, Lkotlin/jvm/functions/k;
if-eqz v0, :cond_15
const/16 p0, 0x14
return p0
:cond_15
instance-of v0, p0, Lkotlin/jvm/functions/l;
if-eqz v0, :cond_16
const/16 p0, 0x15
return p0
:cond_16
instance-of p0, p0, Lkotlin/jvm/functions/m;
if-eqz p0, :cond_17
const/16 p0, 0x16
return p0
:cond_17
const/4 p0, -0x1
return p0
.end method
.method public static isFunctionOfArity(Ljava/lang/Object;I)Z
.locals 1
instance-of v0, p0, Lkotlin/c;
if-eqz v0, :cond_0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->getFunctionArity(Ljava/lang/Object;)I
move-result p0
if-ne p0, p1, :cond_0
const/4 p0, 0x1
return p0
:cond_0
const/4 p0, 0x0
return p0
.end method
.method public static throwCce(Ljava/lang/ClassCastException;)Ljava/lang/ClassCastException;
.locals 1
const-class v0, Lkotlin/jvm/internal/ac;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->a(Ljava/lang/Throwable;Ljava/lang/String;)Ljava/lang/Throwable;
move-result-object p0
check-cast p0, Ljava/lang/ClassCastException;
throw p0
.end method
.method public static throwCce(Ljava/lang/Object;Ljava/lang/String;)V
.locals 1
if-nez p0, :cond_0
const-string p0, "null"
goto :goto_0
:cond_0
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p0
:goto_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p0, " cannot be cast to "
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-static {p0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/String;)V
return-void
.end method
.method public static throwCce(Ljava/lang/String;)V
.locals 1
new-instance v0, Ljava/lang/ClassCastException;
invoke-direct {v0, p0}, Ljava/lang/ClassCastException;-><init>(Ljava/lang/String;)V
invoke-static {v0}, Lkotlin/jvm/internal/ac;->throwCce(Ljava/lang/ClassCastException;)Ljava/lang/ClassCastException;
move-result-object p0
throw p0
.end method