54 lines
1.2 KiB
Smali
54 lines
1.2 KiB
Smali
.class public Lcom/moji/mjweather/feed/utils/JsonUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "JsonUtils.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final a:Lcom/google/gson/Gson;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 9
|
|
new-instance v0, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/mjweather/feed/utils/JsonUtils;->a:Lcom/google/gson/Gson;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 8
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Class<",
|
|
"*>;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 17
|
|
sget-object v0, Lcom/moji/mjweather/feed/utils/JsonUtils;->a:Lcom/google/gson/Gson;
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|