158 lines
4.3 KiB
Smali
158 lines
4.3 KiB
Smali
.class Lcom/discord/models/domain/Model$TypeAdapterFactory$1;
|
|
.super Lcom/google/gson/TypeAdapter;
|
|
.source "Model.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/models/domain/Model$TypeAdapterFactory;->create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/gson/TypeAdapter<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic this$0:Lcom/discord/models/domain/Model$TypeAdapterFactory;
|
|
|
|
.field final synthetic val$type:Lcom/google/gson/reflect/TypeToken;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lcom/discord/models/domain/Model$TypeAdapterFactory;Lcom/google/gson/reflect/TypeToken;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/models/domain/Model$TypeAdapterFactory$1;->this$0:Lcom/discord/models/domain/Model$TypeAdapterFactory;
|
|
|
|
iput-object p2, p0, Lcom/discord/models/domain/Model$TypeAdapterFactory$1;->val$type:Lcom/google/gson/reflect/TypeToken;
|
|
|
|
invoke-direct {p0}, Lcom/google/gson/TypeAdapter;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/gson/stream/JsonReader;",
|
|
")TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Unable to parse model."
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lcom/discord/models/domain/Model$TypeAdapterFactory$1;->val$type:Lcom/google/gson/reflect/TypeToken;
|
|
|
|
iget-object v1, v1, Lcom/google/gson/reflect/TypeToken;->aZK:Ljava/lang/Class;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/models/domain/Model;
|
|
|
|
new-instance v2, Lcom/discord/models/domain/Model$JsonReader;
|
|
|
|
invoke-direct {v2, p1}, Lcom/discord/models/domain/Model$JsonReader;-><init>(Lcom/google/gson/stream/JsonReader;)V
|
|
|
|
invoke-virtual {v2, v1}, Lcom/discord/models/domain/Model$JsonReader;->parse(Lcom/discord/models/domain/Model;)Lcom/discord/models/domain/Model;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
instance-of v1, p1, Ljava/io/IOException;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
throw p1
|
|
|
|
:cond_0
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
invoke-direct {v1, v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
invoke-direct {v1, v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
|
|
:catch_2
|
|
move-exception p1
|
|
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
invoke-direct {v1, v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/gson/stream/JsonWriter;",
|
|
"TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "Writer incorrectly invoked for object."
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|