apkfuckery/com.discord/smali/b/p.smali

1334 lines
28 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Lb/p;
.super Ljava/lang/Object;
.source "Utils.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lb/p$c;,
Lb/p$a;,
Lb/p$b;
}
.end annotation
# static fields
2019-10-23 04:50:18 +00:00
.field static final aTw:[Ljava/lang/reflect/Type;
2019-07-24 11:27:29 +00:00
# direct methods
.method static constructor <clinit>()V
.locals 1
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/reflect/Type;
2019-10-23 04:50:18 +00:00
sput-object v0, Lb/p;->aTw:[Ljava/lang/reflect/Type;
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-10-09 23:16:36 +00:00
.method static X(Ljava/lang/Class;)V
2019-07-24 11:27:29 +00:00
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Class<",
"TT;>;)V"
}
.end annotation
invoke-virtual {p0}, Ljava/lang/Class;->isInterface()Z
move-result v0
if-eqz v0, :cond_1
invoke-virtual {p0}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class;
move-result-object p0
array-length p0, p0
if-gtz p0, :cond_0
return-void
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "API interfaces must not extend other interfaces."
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "API declarations must be interfaces."
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static a(ILjava/lang/reflect/ParameterizedType;)Ljava/lang/reflect/Type;
.locals 4
invoke-interface {p1}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object v0
if-ltz p0, :cond_1
array-length v1, v0
if-ge p0, v1, :cond_1
aget-object p0, v0, p0
instance-of p1, p0, Ljava/lang/reflect/WildcardType;
if-eqz p1, :cond_0
check-cast p0, Ljava/lang/reflect/WildcardType;
invoke-interface {p0}, Ljava/lang/reflect/WildcardType;->getUpperBounds()[Ljava/lang/reflect/Type;
move-result-object p0
const/4 p1, 0x0
aget-object p0, p0, p1
:cond_0
return-object p0
:cond_1
new-instance v1, Ljava/lang/IllegalArgumentException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Index "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p0, " not in range [0,"
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
array-length p0, v0
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p0, ") for "
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method private static a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Type;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Type;",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/Class<",
"*>;)",
"Ljava/lang/reflect/Type;"
}
.end annotation
:goto_0
if-ne p2, p1, :cond_0
return-object p0
:cond_0
invoke-virtual {p2}, Ljava/lang/Class;->isInterface()Z
move-result p0
if-eqz p0, :cond_3
invoke-virtual {p1}, Ljava/lang/Class;->getInterfaces()[Ljava/lang/Class;
move-result-object p0
const/4 v0, 0x0
array-length v1, p0
:goto_1
if-ge v0, v1, :cond_3
aget-object v2, p0, v0
if-ne v2, p2, :cond_1
invoke-virtual {p1}, Ljava/lang/Class;->getGenericInterfaces()[Ljava/lang/reflect/Type;
move-result-object p0
aget-object p0, p0, v0
return-object p0
:cond_1
aget-object v2, p0, v0
invoke-virtual {p2, v2}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v2
if-eqz v2, :cond_2
invoke-virtual {p1}, Ljava/lang/Class;->getGenericInterfaces()[Ljava/lang/reflect/Type;
move-result-object p1
aget-object p1, p1, v0
aget-object p0, p0, v0
goto :goto_3
:cond_2
add-int/lit8 v0, v0, 0x1
goto :goto_1
:cond_3
invoke-virtual {p1}, Ljava/lang/Class;->isInterface()Z
move-result p0
if-nez p0, :cond_6
:goto_2
const-class p0, Ljava/lang/Object;
if-eq p1, p0, :cond_6
invoke-virtual {p1}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
move-result-object p0
if-ne p0, p2, :cond_4
invoke-virtual {p1}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;
move-result-object p0
return-object p0
:cond_4
invoke-virtual {p2, p0}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v0
if-eqz v0, :cond_5
invoke-virtual {p1}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;
move-result-object p1
:goto_3
move-object v3, p1
move-object p1, p0
move-object p0, v3
goto :goto_0
:cond_5
move-object p1, p0
goto :goto_2
:cond_6
return-object p2
.end method
.method private static a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Type;",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/reflect/Type;",
")",
"Ljava/lang/reflect/Type;"
}
.end annotation
:goto_0
instance-of v0, p2, Ljava/lang/reflect/TypeVariable;
const/4 v1, 0x0
if-eqz v0, :cond_5
check-cast p2, Ljava/lang/reflect/TypeVariable;
invoke-interface {p2}, Ljava/lang/reflect/TypeVariable;->getGenericDeclaration()Ljava/lang/reflect/GenericDeclaration;
move-result-object v0
instance-of v2, v0, Ljava/lang/Class;
if-eqz v2, :cond_0
check-cast v0, Ljava/lang/Class;
goto :goto_1
:cond_0
const/4 v0, 0x0
:goto_1
if-eqz v0, :cond_3
invoke-static {p0, p1, v0}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Type;
move-result-object v2
instance-of v3, v2, Ljava/lang/reflect/ParameterizedType;
if-eqz v3, :cond_3
invoke-virtual {v0}, Ljava/lang/Class;->getTypeParameters()[Ljava/lang/reflect/TypeVariable;
move-result-object v0
:goto_2
array-length v3, v0
if-ge v1, v3, :cond_2
aget-object v3, v0, v1
invoke-virtual {p2, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
check-cast v2, Ljava/lang/reflect/ParameterizedType;
invoke-interface {v2}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object v0
aget-object v0, v0, v1
goto :goto_3
:cond_1
add-int/lit8 v1, v1, 0x1
goto :goto_2
:cond_2
new-instance p0, Ljava/util/NoSuchElementException;
invoke-direct {p0}, Ljava/util/NoSuchElementException;-><init>()V
throw p0
:cond_3
move-object v0, p2
:goto_3
if-ne v0, p2, :cond_4
return-object v0
:cond_4
move-object p2, v0
goto :goto_0
:cond_5
instance-of v0, p2, Ljava/lang/Class;
if-eqz v0, :cond_7
move-object v0, p2
check-cast v0, Ljava/lang/Class;
invoke-virtual {v0}, Ljava/lang/Class;->isArray()Z
move-result v2
if-eqz v2, :cond_7
invoke-virtual {v0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
move-result-object p2
invoke-static {p0, p1, p2}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object p0
if-ne p2, p0, :cond_6
return-object v0
:cond_6
new-instance p1, Lb/p$a;
invoke-direct {p1, p0}, Lb/p$a;-><init>(Ljava/lang/reflect/Type;)V
return-object p1
:cond_7
instance-of v0, p2, Ljava/lang/reflect/GenericArrayType;
if-eqz v0, :cond_9
check-cast p2, Ljava/lang/reflect/GenericArrayType;
invoke-interface {p2}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
move-result-object v0
invoke-static {p0, p1, v0}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object p0
if-ne v0, p0, :cond_8
return-object p2
:cond_8
new-instance p1, Lb/p$a;
invoke-direct {p1, p0}, Lb/p$a;-><init>(Ljava/lang/reflect/Type;)V
return-object p1
:cond_9
instance-of v0, p2, Ljava/lang/reflect/ParameterizedType;
const/4 v2, 0x1
if-eqz v0, :cond_f
check-cast p2, Ljava/lang/reflect/ParameterizedType;
invoke-interface {p2}, Ljava/lang/reflect/ParameterizedType;->getOwnerType()Ljava/lang/reflect/Type;
move-result-object v0
invoke-static {p0, p1, v0}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object v3
if-eq v3, v0, :cond_a
const/4 v0, 0x1
goto :goto_4
:cond_a
const/4 v0, 0x0
:goto_4
invoke-interface {p2}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object v4
array-length v5, v4
:goto_5
if-ge v1, v5, :cond_d
aget-object v6, v4, v1
invoke-static {p0, p1, v6}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object v6
aget-object v7, v4, v1
if-eq v6, v7, :cond_c
if-nez v0, :cond_b
invoke-virtual {v4}, [Ljava/lang/reflect/Type;->clone()Ljava/lang/Object;
move-result-object v0
move-object v4, v0
check-cast v4, [Ljava/lang/reflect/Type;
const/4 v0, 0x1
:cond_b
aput-object v6, v4, v1
:cond_c
add-int/lit8 v1, v1, 0x1
goto :goto_5
:cond_d
if-eqz v0, :cond_e
new-instance p0, Lb/p$b;
invoke-interface {p2}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
move-result-object p1
invoke-direct {p0, v3, p1, v4}, Lb/p$b;-><init>(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)V
return-object p0
:cond_e
return-object p2
:cond_f
instance-of v0, p2, Ljava/lang/reflect/WildcardType;
if-eqz v0, :cond_11
check-cast p2, Ljava/lang/reflect/WildcardType;
invoke-interface {p2}, Ljava/lang/reflect/WildcardType;->getLowerBounds()[Ljava/lang/reflect/Type;
move-result-object v0
invoke-interface {p2}, Ljava/lang/reflect/WildcardType;->getUpperBounds()[Ljava/lang/reflect/Type;
move-result-object v3
array-length v4, v0
if-ne v4, v2, :cond_10
aget-object v3, v0, v1
invoke-static {p0, p1, v3}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object p0
aget-object p1, v0, v1
if-eq p0, p1, :cond_11
new-instance p1, Lb/p$c;
new-array p2, v2, [Ljava/lang/reflect/Type;
const-class v0, Ljava/lang/Object;
aput-object v0, p2, v1
new-array v0, v2, [Ljava/lang/reflect/Type;
aput-object p0, v0, v1
invoke-direct {p1, p2, v0}, Lb/p$c;-><init>([Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)V
return-object p1
:cond_10
array-length v0, v3
if-ne v0, v2, :cond_11
aget-object v0, v3, v1
:try_start_0
invoke-static {p0, p1, v0}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object p0
:try_end_0
2019-08-30 20:04:20 +00:00
.catchall {:try_start_0 .. :try_end_0} :catchall_0
2019-07-24 11:27:29 +00:00
aget-object p1, v3, v1
if-eq p0, p1, :cond_11
new-instance p1, Lb/p$c;
new-array p2, v2, [Ljava/lang/reflect/Type;
aput-object p0, p2, v1
2019-10-23 04:50:18 +00:00
sget-object p0, Lb/p;->aTw:[Ljava/lang/reflect/Type;
2019-07-24 11:27:29 +00:00
invoke-direct {p1, p2, p0}, Lb/p$c;-><init>([Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)V
return-object p1
:cond_11
return-object p2
2019-08-30 20:04:20 +00:00
:catchall_0
2019-07-24 11:27:29 +00:00
move-exception p0
goto :goto_7
:goto_6
throw p0
:goto_7
goto :goto_6
.end method
.method static a(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;)Z
.locals 4
:goto_0
const/4 v0, 0x1
if-ne p0, p1, :cond_0
return v0
:cond_0
instance-of v1, p0, Ljava/lang/Class;
if-eqz v1, :cond_1
invoke-virtual {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result p0
return p0
:cond_1
instance-of v1, p0, Ljava/lang/reflect/ParameterizedType;
const/4 v2, 0x0
if-eqz v1, :cond_6
instance-of v1, p1, Ljava/lang/reflect/ParameterizedType;
if-nez v1, :cond_2
return v2
:cond_2
check-cast p0, Ljava/lang/reflect/ParameterizedType;
check-cast p1, Ljava/lang/reflect/ParameterizedType;
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getOwnerType()Ljava/lang/reflect/Type;
move-result-object v1
invoke-interface {p1}, Ljava/lang/reflect/ParameterizedType;->getOwnerType()Ljava/lang/reflect/Type;
move-result-object v3
if-eq v1, v3, :cond_4
if-eqz v1, :cond_3
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_3
goto :goto_1
:cond_3
const/4 v1, 0x0
goto :goto_2
:cond_4
:goto_1
const/4 v1, 0x1
:goto_2
if-eqz v1, :cond_5
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
move-result-object v1
invoke-interface {p1}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
move-result-object v3
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_5
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object p0
invoke-interface {p1}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object p1
invoke-static {p0, p1}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_5
return v0
:cond_5
return v2
:cond_6
instance-of v1, p0, Ljava/lang/reflect/GenericArrayType;
if-eqz v1, :cond_8
instance-of v0, p1, Ljava/lang/reflect/GenericArrayType;
if-nez v0, :cond_7
return v2
:cond_7
check-cast p0, Ljava/lang/reflect/GenericArrayType;
check-cast p1, Ljava/lang/reflect/GenericArrayType;
invoke-interface {p0}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
move-result-object p0
invoke-interface {p1}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
move-result-object p1
goto :goto_0
:cond_8
instance-of v1, p0, Ljava/lang/reflect/WildcardType;
if-eqz v1, :cond_b
instance-of v1, p1, Ljava/lang/reflect/WildcardType;
if-nez v1, :cond_9
return v2
:cond_9
check-cast p0, Ljava/lang/reflect/WildcardType;
check-cast p1, Ljava/lang/reflect/WildcardType;
invoke-interface {p0}, Ljava/lang/reflect/WildcardType;->getUpperBounds()[Ljava/lang/reflect/Type;
move-result-object v1
invoke-interface {p1}, Ljava/lang/reflect/WildcardType;->getUpperBounds()[Ljava/lang/reflect/Type;
move-result-object v3
invoke-static {v1, v3}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_a
invoke-interface {p0}, Ljava/lang/reflect/WildcardType;->getLowerBounds()[Ljava/lang/reflect/Type;
move-result-object p0
invoke-interface {p1}, Ljava/lang/reflect/WildcardType;->getLowerBounds()[Ljava/lang/reflect/Type;
move-result-object p1
invoke-static {p0, p1}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_a
return v0
:cond_a
return v2
:cond_b
instance-of v1, p0, Ljava/lang/reflect/TypeVariable;
if-eqz v1, :cond_d
instance-of v1, p1, Ljava/lang/reflect/TypeVariable;
if-nez v1, :cond_c
return v2
:cond_c
check-cast p0, Ljava/lang/reflect/TypeVariable;
check-cast p1, Ljava/lang/reflect/TypeVariable;
invoke-interface {p0}, Ljava/lang/reflect/TypeVariable;->getGenericDeclaration()Ljava/lang/reflect/GenericDeclaration;
move-result-object v1
invoke-interface {p1}, Ljava/lang/reflect/TypeVariable;->getGenericDeclaration()Ljava/lang/reflect/GenericDeclaration;
move-result-object v3
if-ne v1, v3, :cond_d
invoke-interface {p0}, Ljava/lang/reflect/TypeVariable;->getName()Ljava/lang/String;
move-result-object p0
invoke-interface {p1}, Ljava/lang/reflect/TypeVariable;->getName()Ljava/lang/String;
move-result-object p1
invoke-virtual {p0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_d
return v0
:cond_d
return v2
.end method
.method static a([Ljava/lang/annotation/Annotation;Ljava/lang/Class;)Z
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Ljava/lang/annotation/Annotation;",
"Ljava/lang/Class<",
"+",
"Ljava/lang/annotation/Annotation;",
">;)Z"
}
.end annotation
array-length v0, p0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_1
aget-object v3, p0, v2
invoke-virtual {p1, v3}, Ljava/lang/Class;->isInstance(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_0
const/4 p0, 0x1
return p0
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return v1
.end method
2019-10-09 23:16:36 +00:00
.method static aD(Ljava/lang/Object;)I
2019-07-24 11:27:29 +00:00
.locals 0
if-eqz p0, :cond_0
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
move-result p0
return p0
:cond_0
const/4 p0, 0x0
return p0
.end method
.method static b(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Type;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Type;",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/Class<",
"*>;)",
"Ljava/lang/reflect/Type;"
}
.end annotation
invoke-virtual {p2, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
move-result v0
if-eqz v0, :cond_0
invoke-static {p0, p1, p2}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/reflect/Type;
move-result-object p2
invoke-static {p0, p1, p2}, Lb/p;->a(Ljava/lang/reflect/Type;Ljava/lang/Class;Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
move-result-object p0
return-object p0
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
.end method
.method static b(Lokhttp3/x;)Lokhttp3/x;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
new-instance v0, Lokio/c;
invoke-direct {v0}, Lokio/c;-><init>()V
2019-10-23 04:50:18 +00:00
invoke-virtual {p0}, Lokhttp3/x;->FO()Lokio/d;
2019-07-24 11:27:29 +00:00
move-result-object v1
invoke-interface {v1, v0}, Lokio/d;->a(Lokio/q;)J
invoke-virtual {p0}, Lokhttp3/x;->contentType()Lokhttp3/MediaType;
move-result-object v1
invoke-virtual {p0}, Lokhttp3/x;->contentLength()J
move-result-wide v2
invoke-static {v1, v2, v3, v0}, Lokhttp3/x;->a(Lokhttp3/MediaType;JLokio/d;)Lokhttp3/x;
move-result-object p0
return-object p0
.end method
.method public static c(Ljava/lang/reflect/Type;)Ljava/lang/Class;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Type;",
")",
"Ljava/lang/Class<",
"*>;"
}
.end annotation
:goto_0
const-string v0, "type == null"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lb/p;->g(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
2019-07-24 11:27:29 +00:00
instance-of v0, p0, Ljava/lang/Class;
if-eqz v0, :cond_0
check-cast p0, Ljava/lang/Class;
return-object p0
:cond_0
instance-of v0, p0, Ljava/lang/reflect/ParameterizedType;
if-eqz v0, :cond_2
check-cast p0, Ljava/lang/reflect/ParameterizedType;
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
move-result-object p0
instance-of v0, p0, Ljava/lang/Class;
if-eqz v0, :cond_1
check-cast p0, Ljava/lang/Class;
return-object p0
:cond_1
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
:cond_2
instance-of v0, p0, Ljava/lang/reflect/GenericArrayType;
const/4 v1, 0x0
if-eqz v0, :cond_3
check-cast p0, Ljava/lang/reflect/GenericArrayType;
invoke-interface {p0}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
move-result-object p0
invoke-static {p0}, Lb/p;->c(Ljava/lang/reflect/Type;)Ljava/lang/Class;
move-result-object p0
invoke-static {p0, v1}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p0
return-object p0
:cond_3
instance-of v0, p0, Ljava/lang/reflect/TypeVariable;
if-eqz v0, :cond_4
const-class p0, Ljava/lang/Object;
return-object p0
:cond_4
instance-of v0, p0, Ljava/lang/reflect/WildcardType;
if-eqz v0, :cond_5
check-cast p0, Ljava/lang/reflect/WildcardType;
invoke-interface {p0}, Ljava/lang/reflect/WildcardType;->getUpperBounds()[Ljava/lang/reflect/Type;
move-result-object p0
aget-object p0, p0, v1
goto :goto_0
:cond_5
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Expected a Class, ParameterizedType, or GenericArrayType, but <"
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, "> is of type "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
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
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
goto :goto_2
:goto_1
throw v0
:goto_2
goto :goto_1
.end method
.method static d(Ljava/lang/reflect/Type;)Ljava/lang/String;
.locals 1
instance-of v0, p0, Ljava/lang/Class;
if-eqz v0, :cond_0
check-cast p0, Ljava/lang/Class;
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object p0
return-object p0
:cond_0
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method static f(Ljava/lang/reflect/Type;)V
.locals 1
instance-of v0, p0, Ljava/lang/Class;
if-eqz v0, :cond_1
check-cast p0, Ljava/lang/Class;
invoke-virtual {p0}, Ljava/lang/Class;->isPrimitive()Z
move-result p0
if-nez p0, :cond_0
goto :goto_0
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
:cond_1
:goto_0
return-void
.end method
2019-10-09 23:16:36 +00:00
.method static g(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.locals 0
.param p0 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Ljava/lang/String;",
")TT;"
}
.end annotation
if-eqz p0, :cond_0
return-object p0
:cond_0
new-instance p0, Ljava/lang/NullPointerException;
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
2019-07-24 11:27:29 +00:00
.method static k(Ljava/lang/reflect/Type;)Z
.locals 5
:goto_0
instance-of v0, p0, Ljava/lang/Class;
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
:cond_0
instance-of v0, p0, Ljava/lang/reflect/ParameterizedType;
const/4 v2, 0x1
if-eqz v0, :cond_3
check-cast p0, Ljava/lang/reflect/ParameterizedType;
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
move-result-object p0
array-length v0, p0
const/4 v3, 0x0
:goto_1
if-ge v3, v0, :cond_2
aget-object v4, p0, v3
invoke-static {v4}, Lb/p;->k(Ljava/lang/reflect/Type;)Z
move-result v4
if-eqz v4, :cond_1
return v2
:cond_1
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_2
return v1
:cond_3
instance-of v0, p0, Ljava/lang/reflect/GenericArrayType;
if-eqz v0, :cond_4
check-cast p0, Ljava/lang/reflect/GenericArrayType;
invoke-interface {p0}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
move-result-object p0
goto :goto_0
:cond_4
instance-of v0, p0, Ljava/lang/reflect/TypeVariable;
if-eqz v0, :cond_5
return v2
:cond_5
instance-of v0, p0, Ljava/lang/reflect/WildcardType;
if-eqz v0, :cond_6
return v2
:cond_6
if-nez p0, :cond_7
const-string v0, "null"
goto :goto_2
:cond_7
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
:goto_2
new-instance v1, Ljava/lang/IllegalArgumentException;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Expected a Class, ParameterizedType, or GenericArrayType, but <"
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p0, "> is of type "
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
goto :goto_4
:goto_3
throw v1
:goto_4
goto :goto_3
.end method
.method static l(Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
.locals 1
instance-of v0, p0, Ljava/lang/reflect/ParameterizedType;
if-eqz v0, :cond_0
const/4 v0, 0x0
check-cast p0, Ljava/lang/reflect/ParameterizedType;
invoke-static {v0, p0}, Lb/p;->a(ILjava/lang/reflect/ParameterizedType;)Ljava/lang/reflect/Type;
move-result-object p0
return-object p0
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "Call return type must be parameterized as Call<Foo> or Call<? extends Foo>"
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method