AdFormatSerializer.smali
.class public Lcom/google/android/ads/mediationtestsuite/utils/AdFormatSerializer;
.super Ljava/lang/Object;
.source "AdFormatSerializer.java"
# interfaces
.implements Lcom/google/gson/v;
.implements Lcom/google/gson/o;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/gson/v<",
"Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;",
">;",
"Lcom/google/gson/o<",
"Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;",
">;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.registers 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public a(Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;Ljava/lang/reflect/Type;Lcom/google/gson/u;)Lcom/google/gson/p;
.registers 4
.line 1
new-instance p2, Lcom/google/gson/t;
invoke-virtual {p1}, Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;->getFormatString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Lcom/google/gson/t;-><init>(Ljava/lang/String;)V
return-object p2
.end method
.method public deserialize(Lcom/google/gson/p;Ljava/lang/reflect/Type;Lcom/google/gson/n;)Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;
.registers 5
.line 2
invoke-virtual {p1}, Lcom/google/gson/p;->j()Ljava/lang/String;
move-result-object p1
.line 3
invoke-static {p1}, Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;->from(Ljava/lang/String;)Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;
move-result-object p2
if-nez p2, :cond_26
.line 4
new-instance p2, Lcom/google/gson/JsonParseException;
const-string p3, "Can\'t parse ad format for key: "
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
if-eqz v0, :cond_1d
invoke-virtual {p3, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_22
:cond_1d
new-instance p1, Ljava/lang/String;
invoke-direct {p1, p3}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_22
invoke-direct {p2, p1}, Lcom/google/gson/JsonParseException;-><init>(Ljava/lang/String;)V
throw p2
:cond_26
return-object p2
.end method
.method public bridge synthetic deserialize(Lcom/google/gson/p;Ljava/lang/reflect/Type;Lcom/google/gson/n;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/gson/JsonParseException;
}
.end annotation
.line 1
invoke-virtual {p0, p1, p2, p3}, Lcom/google/android/ads/mediationtestsuite/utils/AdFormatSerializer;->deserialize(Lcom/google/gson/p;Ljava/lang/reflect/Type;Lcom/google/gson/n;)Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic serialize(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/u;)Lcom/google/gson/p;
.registers 4
.line 1
check-cast p1, Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;
invoke-virtual {p0, p1, p2, p3}, Lcom/google/android/ads/mediationtestsuite/utils/AdFormatSerializer;->a(Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;Ljava/lang/reflect/Type;Lcom/google/gson/u;)Lcom/google/gson/p;
move-result-object p1
return-object p1
.end method