215 lines
4.8 KiB
Smali
215 lines
4.8 KiB
Smali
|
.class public abstract Lcom/google/gson/JsonElement;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "JsonElement.java"
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public g()I
|
||
|
.locals 2
|
||
|
|
||
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public h()Lf/k/d/m;
|
||
|
.locals 3
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/google/gson/JsonElement;->k()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
check-cast v0, Lf/k/d/m;
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Not a JSON Array: "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public i()Lcom/google/gson/JsonObject;
|
||
|
.locals 3
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/google/gson/JsonElement;->m()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
check-cast v0, Lcom/google/gson/JsonObject;
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Not a JSON Object: "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public j()Lf/k/d/s;
|
||
|
.locals 3
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/google/gson/JsonElement;->n()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
move-object v0, p0
|
||
|
|
||
|
check-cast v0, Lf/k/d/s;
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Not a JSON Primitive: "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public k()Z
|
||
|
.locals 1
|
||
|
|
||
|
instance-of v0, p0, Lf/k/d/m;
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public l()Z
|
||
|
.locals 1
|
||
|
|
||
|
instance-of v0, p0, Lf/k/d/q;
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public m()Z
|
||
|
.locals 1
|
||
|
|
||
|
instance-of v0, p0, Lcom/google/gson/JsonObject;
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public n()Z
|
||
|
.locals 1
|
||
|
|
||
|
instance-of v0, p0, Lf/k/d/s;
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public toString()Ljava/lang/String;
|
||
|
.locals 3
|
||
|
|
||
|
:try_start_0
|
||
|
new-instance v0, Ljava/io/StringWriter;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
|
||
|
|
||
|
new-instance v1, Lcom/google/gson/stream/JsonWriter;
|
||
|
|
||
|
invoke-direct {v1, v0}, Lcom/google/gson/stream/JsonWriter;-><init>(Ljava/io/Writer;)V
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
invoke-virtual {v1, v2}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
|
||
|
|
||
|
sget-object v2, Lf/k/d/z/z/o;->X:Lcom/google/gson/TypeAdapter;
|
||
|
|
||
|
invoke-virtual {v2, v1, p0}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
:try_end_0
|
||
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
new-instance v1, Ljava/lang/AssertionError;
|
||
|
|
||
|
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
||
|
|
||
|
throw v1
|
||
|
.end method
|