286 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			286 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public final Lcom/google/gson/JsonParser;
 | |
| .super Ljava/lang/Object;
 | |
| .source "JsonParser.java"
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>()V
 | |
|     .locals 0
 | |
|     .annotation runtime Ljava/lang/Deprecated;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static parseReader(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
 | |
|     .locals 6
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonIOException;,
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     const-string v0, " to Json"
 | |
| 
 | |
|     const-string v1, "Failed parsing JSON source: "
 | |
| 
 | |
|     .line 8
 | |
|     invoke-virtual {p0}, Lcom/google/gson/stream/JsonReader;->isLenient()Z
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     const/4 v3, 0x1
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p0, v3}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
 | |
| 
 | |
|     .line 10
 | |
|     :try_start_0
 | |
|     invoke-static {p0}, Lcom/google/gson/internal/Streams;->parse(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object v0
 | |
|     :try_end_0
 | |
|     .catch Ljava/lang/StackOverflowError; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0
 | |
|     .catchall {:try_start_0 .. :try_end_0} :catchall_0
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p0, v2}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     :catchall_0
 | |
|     move-exception v0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception v3
 | |
| 
 | |
|     .line 12
 | |
|     :try_start_1
 | |
|     new-instance v4, Lcom/google/gson/JsonParseException;
 | |
| 
 | |
|     new-instance v5, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-direct {v4, v0, v3}, Lcom/google/gson/JsonParseException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v4
 | |
| 
 | |
|     :catch_1
 | |
|     move-exception v3
 | |
| 
 | |
|     .line 13
 | |
|     new-instance v4, Lcom/google/gson/JsonParseException;
 | |
| 
 | |
|     new-instance v5, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
 | |
| 
 | |
|     invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-direct {v4, v0, v3}, Lcom/google/gson/JsonParseException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v4
 | |
|     :try_end_1
 | |
|     .catchall {:try_start_1 .. :try_end_1} :catchall_0
 | |
| 
 | |
|     .line 14
 | |
|     :goto_0
 | |
|     invoke-virtual {p0, v2}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
 | |
| 
 | |
|     .line 15
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static parseReader(Ljava/io/Reader;)Lcom/google/gson/JsonElement;
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonIOException;,
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     new-instance v0, Lcom/google/gson/stream/JsonReader;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/gson/stream/JsonReader;-><init>(Ljava/io/Reader;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {v0}, Lcom/google/gson/JsonParser;->parseReader(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Lcom/google/gson/JsonElement;->isJsonNull()Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-nez v1, :cond_1
 | |
| 
 | |
|     invoke-virtual {v0}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     sget-object v1, Lcom/google/gson/stream/JsonToken;->END_DOCUMENT:Lcom/google/gson/stream/JsonToken;
 | |
| 
 | |
|     if-ne v0, v1, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     new-instance p0, Lcom/google/gson/JsonSyntaxException;
 | |
| 
 | |
|     const-string v0, "Did not consume the entire document."
 | |
| 
 | |
|     invoke-direct {p0, v0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     throw p0
 | |
|     :try_end_0
 | |
|     .catch Lcom/google/gson/stream/MalformedJsonException; {:try_start_0 .. :try_end_0} :catch_2
 | |
|     .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     return-object p0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p0
 | |
| 
 | |
|     .line 5
 | |
|     new-instance v0, Lcom/google/gson/JsonSyntaxException;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v0
 | |
| 
 | |
|     :catch_1
 | |
|     move-exception p0
 | |
| 
 | |
|     .line 6
 | |
|     new-instance v0, Lcom/google/gson/JsonIOException;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v0
 | |
| 
 | |
|     :catch_2
 | |
|     move-exception p0
 | |
| 
 | |
|     .line 7
 | |
|     new-instance v0, Lcom/google/gson/JsonSyntaxException;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/io/StringReader;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/gson/JsonParser;->parseReader(Ljava/io/Reader;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public parse(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonIOException;,
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation runtime Ljava/lang/Deprecated;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p1}, Lcom/google/gson/JsonParser;->parseReader(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public parse(Ljava/io/Reader;)Lcom/google/gson/JsonElement;
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonIOException;,
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation runtime Ljava/lang/Deprecated;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p1}, Lcom/google/gson/JsonParser;->parseReader(Ljava/io/Reader;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public parse(Ljava/lang/String;)Lcom/google/gson/JsonElement;
 | |
|     .locals 0
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Lcom/google/gson/JsonSyntaxException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation runtime Ljava/lang/Deprecated;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p1}, Lcom/google/gson/JsonParser;->parseString(Ljava/lang/String;)Lcom/google/gson/JsonElement;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 |