894 lines
21 KiB
Smali
894 lines
21 KiB
Smali
.class public Lcom/google/gson/reflect/TypeToken;
|
|
.super Ljava/lang/Object;
|
|
.source "TypeToken.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final hashCode:I
|
|
|
|
.field public final rawType:Ljava/lang/Class;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Class<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final type:Ljava/lang/reflect/Type;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/gson/reflect/TypeToken;->getSuperclassTypeParameter(Ljava/lang/Class;)Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-static {v0}, Lf/h/d/u/a;->e(Ljava/lang/reflect/Type;)Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/gson/reflect/TypeToken;->rawType:Ljava/lang/Class;
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/google/gson/reflect/TypeToken;->hashCode:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/reflect/Type;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-static {p1}, Lf/h/d/u/a;->a(Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-static {p1}, Lf/h/d/u/a;->e(Ljava/lang/reflect/Type;)Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/gson/reflect/TypeToken;->rawType:Ljava/lang/Class;
|
|
|
|
iget-object p1, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/google/gson/reflect/TypeToken;->hashCode:I
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static varargs buildUnexpectedTypeError(Ljava/lang/reflect/Type;[Ljava/lang/Class;)Ljava/lang/AssertionError;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
"[",
|
|
"Ljava/lang/Class<",
|
|
"*>;)",
|
|
"Ljava/lang/AssertionError;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Unexpected type. Expected one of: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_0
|
|
|
|
aget-object v3, p1, v2
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, ", "
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p1, "but got: "
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ", for type token: "
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p0, 0x2e
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
new-instance p0, Ljava/lang/AssertionError;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static get(Ljava/lang/Class;)Lcom/google/gson/reflect/TypeToken;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"TT;>;)",
|
|
"Lcom/google/gson/reflect/TypeToken<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/gson/reflect/TypeToken;-><init>(Ljava/lang/reflect/Type;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
")",
|
|
"Lcom/google/gson/reflect/TypeToken<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/gson/reflect/TypeToken;-><init>(Ljava/lang/reflect/Type;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getArray(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
")",
|
|
"Lcom/google/gson/reflect/TypeToken<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
new-instance v1, Lf/h/d/u/a$a;
|
|
|
|
invoke-direct {v1, p0}, Lf/h/d/u/a$a;-><init>(Ljava/lang/reflect/Type;)V
|
|
|
|
invoke-direct {v0, v1}, Lcom/google/gson/reflect/TypeToken;-><init>(Ljava/lang/reflect/Type;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static varargs getParameterized(Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
"[",
|
|
"Ljava/lang/reflect/Type;",
|
|
")",
|
|
"Lcom/google/gson/reflect/TypeToken<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
new-instance v1, Lf/h/d/u/a$b;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v1, v2, p0, p1}, Lf/h/d/u/a$b;-><init>(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)V
|
|
|
|
invoke-direct {v0, v1}, Lcom/google/gson/reflect/TypeToken;-><init>(Ljava/lang/reflect/Type;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getSuperclassTypeParameter(Ljava/lang/Class;)Ljava/lang/reflect/Type;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;)",
|
|
"Ljava/lang/reflect/Type;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of v0, p0, Ljava/lang/Class;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
check-cast p0, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
aget-object p0, p0, v0
|
|
|
|
invoke-static {p0}, Lf/h/d/u/a;->a(Ljava/lang/reflect/Type;)Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v0, "Missing type parameter."
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/GenericArrayType;)Z
|
|
.locals 1
|
|
|
|
invoke-interface {p1}, Ljava/lang/reflect/GenericArrayType;->getGenericComponentType()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of v0, p1, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
instance-of v0, p0, Ljava/lang/reflect/GenericArrayType;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
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_1
|
|
|
|
:cond_0
|
|
instance-of v0, p0, Ljava/lang/Class;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
check-cast p0, Ljava/lang/Class;
|
|
|
|
:goto_0
|
|
invoke-virtual {p0}, Ljava/lang/Class;->isArray()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
check-cast p1, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_2
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
"Ljava/lang/reflect/ParameterizedType;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/reflect/Type;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p1, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
invoke-static {p0}, Lf/h/d/u/a;->e(Ljava/lang/reflect/Type;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
instance-of v4, p0, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
move-object v3, p0
|
|
|
|
check-cast v3, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
:cond_2
|
|
if-eqz v3, :cond_5
|
|
|
|
invoke-interface {v3}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getTypeParameters()[Ljava/lang/reflect/TypeVariable;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
:goto_0
|
|
array-length v6, p0
|
|
|
|
if-ge v5, v6, :cond_4
|
|
|
|
aget-object v6, p0, v5
|
|
|
|
aget-object v7, v4, v5
|
|
|
|
:goto_1
|
|
instance-of v8, v6, Ljava/lang/reflect/TypeVariable;
|
|
|
|
if-eqz v8, :cond_3
|
|
|
|
check-cast v6, Ljava/lang/reflect/TypeVariable;
|
|
|
|
invoke-interface {v6}, Ljava/lang/reflect/TypeVariable;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {p2, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/lang/reflect/Type;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-interface {v7}, Ljava/lang/reflect/TypeVariable;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {p2, v7, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
invoke-static {v3, p1, p2}, Lcom/google/gson/reflect/TypeToken;->typeEquals(Ljava/lang/reflect/ParameterizedType;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
return v2
|
|
|
|
:cond_5
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getGenericInterfaces()[Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
array-length v3, p0
|
|
|
|
:goto_2
|
|
if-ge v0, v3, :cond_7
|
|
|
|
aget-object v4, p0, v0
|
|
|
|
new-instance v5, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v5, p2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {v4, p1, v5}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
return v2
|
|
|
|
:cond_6
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0, p2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static matches(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;Ljava/util/Map;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/Type;",
|
|
"Ljava/lang/reflect/Type;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/reflect/Type;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
instance-of v0, p0, Ljava/lang/reflect/TypeVariable;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p0, Ljava/lang/reflect/TypeVariable;
|
|
|
|
invoke-interface {p0}, Ljava/lang/reflect/TypeVariable;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p2, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static typeEquals(Ljava/lang/reflect/ParameterizedType;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/reflect/ParameterizedType;",
|
|
"Ljava/lang/reflect/ParameterizedType;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/reflect/Type;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p0}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1}, Ljava/lang/reflect/ParameterizedType;->getRawType()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
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
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
array-length v2, p0
|
|
|
|
if-ge v0, v2, :cond_1
|
|
|
|
aget-object v2, p0, v0
|
|
|
|
aget-object v3, p1, v0
|
|
|
|
invoke-static {v2, v3, p2}, Lcom/google/gson/reflect/TypeToken;->matches(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;Ljava/util/Map;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final equals(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
instance-of v0, p1, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
check-cast p1, Lcom/google/gson/reflect/TypeToken;
|
|
|
|
iget-object p1, p1, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-static {v0, p1}, Lf/h/d/u/a;->c(Ljava/lang/reflect/Type;Ljava/lang/reflect/Type;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getRawType()Ljava/lang/Class;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/lang/Class<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->rawType:Ljava/lang/Class;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getType()Ljava/lang/reflect/Type;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final hashCode()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/google/gson/reflect/TypeToken;->hashCode:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isAssignableFrom(Lcom/google/gson/reflect/TypeToken;)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/gson/reflect/TypeToken<",
|
|
"*>;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/google/gson/reflect/TypeToken;->getType()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public isAssignableFrom(Ljava/lang/Class;)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public isAssignableFrom(Ljava/lang/reflect/Type;)Z
|
|
.locals 4
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
instance-of v3, v1, Ljava/lang/Class;
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->rawType:Ljava/lang/Class;
|
|
|
|
invoke-static {p1}, Lf/h/d/u/a;->e(Ljava/lang/reflect/Type;)Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
instance-of v3, v1, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
check-cast v1, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
invoke-static {p1, v1, v0}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/ParameterizedType;Ljava/util/Map;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_3
|
|
instance-of v3, v1, Ljava/lang/reflect/GenericArrayType;
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
iget-object v1, p0, Lcom/google/gson/reflect/TypeToken;->rawType:Ljava/lang/Class;
|
|
|
|
invoke-static {p1}, Lf/h/d/u/a;->e(Ljava/lang/reflect/Type;)Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
iget-object v1, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
check-cast v1, Ljava/lang/reflect/GenericArrayType;
|
|
|
|
invoke-static {p1, v1}, Lcom/google/gson/reflect/TypeToken;->isAssignableFrom(Ljava/lang/reflect/Type;Ljava/lang/reflect/GenericArrayType;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_4
|
|
return v0
|
|
|
|
:cond_5
|
|
const/4 p1, 0x3
|
|
|
|
new-array p1, p1, [Ljava/lang/Class;
|
|
|
|
const-class v3, Ljava/lang/Class;
|
|
|
|
aput-object v3, p1, v0
|
|
|
|
const-class v0, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
aput-object v0, p1, v2
|
|
|
|
const/4 v0, 0x2
|
|
|
|
const-class v2, Ljava/lang/reflect/GenericArrayType;
|
|
|
|
aput-object v2, p1, v0
|
|
|
|
invoke-static {v1, p1}, Lcom/google/gson/reflect/TypeToken;->buildUnexpectedTypeError(Ljava/lang/reflect/Type;[Ljava/lang/Class;)Ljava/lang/AssertionError;
|
|
|
|
move-result-object p1
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/gson/reflect/TypeToken;->type:Ljava/lang/reflect/Type;
|
|
|
|
invoke-static {v0}, Lf/h/d/u/a;->i(Ljava/lang/reflect/Type;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|