JsonElement.smali 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. .class public abstract Lcom/google/gson/JsonElement;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # direct methods
  5. .method public constructor <init>()V
  6. .locals 0
  7. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  8. return-void
  9. .end method
  10. # virtual methods
  11. .method abstract deepCopy()Lcom/google/gson/JsonElement;
  12. .end method
  13. .method public getAsBigDecimal()Ljava/math/BigDecimal;
  14. .locals 2
  15. new-instance v0, Ljava/lang/UnsupportedOperationException;
  16. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  17. move-result-object v1
  18. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  19. move-result-object v1
  20. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  21. throw v0
  22. .end method
  23. .method public getAsBigInteger()Ljava/math/BigInteger;
  24. .locals 2
  25. new-instance v0, Ljava/lang/UnsupportedOperationException;
  26. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  27. move-result-object v1
  28. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  29. move-result-object v1
  30. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  31. throw v0
  32. .end method
  33. .method public getAsBoolean()Z
  34. .locals 2
  35. new-instance v0, Ljava/lang/UnsupportedOperationException;
  36. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  37. move-result-object v1
  38. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  39. move-result-object v1
  40. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  41. throw v0
  42. .end method
  43. .method getAsBooleanWrapper()Ljava/lang/Boolean;
  44. .locals 2
  45. new-instance v0, Ljava/lang/UnsupportedOperationException;
  46. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  47. move-result-object v1
  48. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  49. move-result-object v1
  50. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  51. throw v0
  52. .end method
  53. .method public getAsByte()B
  54. .locals 2
  55. new-instance v0, Ljava/lang/UnsupportedOperationException;
  56. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  57. move-result-object v1
  58. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  59. move-result-object v1
  60. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  61. throw v0
  62. .end method
  63. .method public getAsCharacter()C
  64. .locals 2
  65. new-instance v0, Ljava/lang/UnsupportedOperationException;
  66. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  67. move-result-object v1
  68. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  69. move-result-object v1
  70. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  71. throw v0
  72. .end method
  73. .method public getAsDouble()D
  74. .locals 2
  75. new-instance v0, Ljava/lang/UnsupportedOperationException;
  76. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  77. move-result-object v1
  78. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  79. move-result-object v1
  80. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  81. throw v0
  82. .end method
  83. .method public getAsFloat()F
  84. .locals 2
  85. new-instance v0, Ljava/lang/UnsupportedOperationException;
  86. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  87. move-result-object v1
  88. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  89. move-result-object v1
  90. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  91. throw v0
  92. .end method
  93. .method public getAsInt()I
  94. .locals 2
  95. new-instance v0, Ljava/lang/UnsupportedOperationException;
  96. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  97. move-result-object v1
  98. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  99. move-result-object v1
  100. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  101. throw v0
  102. .end method
  103. .method public getAsJsonArray()Lcom/google/gson/JsonArray;
  104. .locals 3
  105. invoke-virtual {p0}, Lcom/google/gson/JsonElement;->isJsonArray()Z
  106. move-result v0
  107. if-eqz v0, :cond_0
  108. move-object v0, p0
  109. check-cast v0, Lcom/google/gson/JsonArray;
  110. return-object v0
  111. :cond_0
  112. new-instance v0, Ljava/lang/IllegalStateException;
  113. new-instance v1, Ljava/lang/StringBuilder;
  114. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  115. const-string v2, "Not a JSON Array: "
  116. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  117. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  118. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  119. move-result-object v1
  120. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  121. throw v0
  122. .end method
  123. .method public getAsJsonNull()Lcom/google/gson/JsonNull;
  124. .locals 3
  125. invoke-virtual {p0}, Lcom/google/gson/JsonElement;->isJsonNull()Z
  126. move-result v0
  127. if-eqz v0, :cond_0
  128. move-object v0, p0
  129. check-cast v0, Lcom/google/gson/JsonNull;
  130. return-object v0
  131. :cond_0
  132. new-instance v0, Ljava/lang/IllegalStateException;
  133. new-instance v1, Ljava/lang/StringBuilder;
  134. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  135. const-string v2, "Not a JSON Null: "
  136. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  137. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  138. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  139. move-result-object v1
  140. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  141. throw v0
  142. .end method
  143. .method public getAsJsonObject()Lcom/google/gson/JsonObject;
  144. .locals 3
  145. invoke-virtual {p0}, Lcom/google/gson/JsonElement;->isJsonObject()Z
  146. move-result v0
  147. if-eqz v0, :cond_0
  148. move-object v0, p0
  149. check-cast v0, Lcom/google/gson/JsonObject;
  150. return-object v0
  151. :cond_0
  152. new-instance v0, Ljava/lang/IllegalStateException;
  153. new-instance v1, Ljava/lang/StringBuilder;
  154. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  155. const-string v2, "Not a JSON Object: "
  156. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  157. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  158. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  159. move-result-object v1
  160. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  161. throw v0
  162. .end method
  163. .method public getAsJsonPrimitive()Lcom/google/gson/JsonPrimitive;
  164. .locals 3
  165. invoke-virtual {p0}, Lcom/google/gson/JsonElement;->isJsonPrimitive()Z
  166. move-result v0
  167. if-eqz v0, :cond_0
  168. move-object v0, p0
  169. check-cast v0, Lcom/google/gson/JsonPrimitive;
  170. return-object v0
  171. :cond_0
  172. new-instance v0, Ljava/lang/IllegalStateException;
  173. new-instance v1, Ljava/lang/StringBuilder;
  174. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  175. const-string v2, "Not a JSON Primitive: "
  176. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  177. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  178. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  179. move-result-object v1
  180. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  181. throw v0
  182. .end method
  183. .method public getAsLong()J
  184. .locals 2
  185. new-instance v0, Ljava/lang/UnsupportedOperationException;
  186. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  187. move-result-object v1
  188. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  189. move-result-object v1
  190. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  191. throw v0
  192. .end method
  193. .method public getAsNumber()Ljava/lang/Number;
  194. .locals 2
  195. new-instance v0, Ljava/lang/UnsupportedOperationException;
  196. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  197. move-result-object v1
  198. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  199. move-result-object v1
  200. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  201. throw v0
  202. .end method
  203. .method public getAsShort()S
  204. .locals 2
  205. new-instance v0, Ljava/lang/UnsupportedOperationException;
  206. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  207. move-result-object v1
  208. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  209. move-result-object v1
  210. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  211. throw v0
  212. .end method
  213. .method public getAsString()Ljava/lang/String;
  214. .locals 2
  215. new-instance v0, Ljava/lang/UnsupportedOperationException;
  216. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  217. move-result-object v1
  218. invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
  219. move-result-object v1
  220. invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
  221. throw v0
  222. .end method
  223. .method public isJsonArray()Z
  224. .locals 1
  225. instance-of v0, p0, Lcom/google/gson/JsonArray;
  226. return v0
  227. .end method
  228. .method public isJsonNull()Z
  229. .locals 1
  230. instance-of v0, p0, Lcom/google/gson/JsonNull;
  231. return v0
  232. .end method
  233. .method public isJsonObject()Z
  234. .locals 1
  235. instance-of v0, p0, Lcom/google/gson/JsonObject;
  236. return v0
  237. .end method
  238. .method public isJsonPrimitive()Z
  239. .locals 1
  240. instance-of v0, p0, Lcom/google/gson/JsonPrimitive;
  241. return v0
  242. .end method
  243. .method public toString()Ljava/lang/String;
  244. .locals 3
  245. :try_start_0
  246. new-instance v0, Ljava/io/StringWriter;
  247. invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
  248. new-instance v1, Lcom/google/gson/stream/JsonWriter;
  249. invoke-direct {v1, v0}, Lcom/google/gson/stream/JsonWriter;-><init>(Ljava/io/Writer;)V
  250. const/4 v2, 0x1
  251. invoke-virtual {v1, v2}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  252. invoke-static {p0, v1}, Lcom/google/gson/internal/Streams;->write(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
  253. invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
  254. move-result-object v0
  255. :try_end_0
  256. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  257. return-object v0
  258. :catch_0
  259. move-exception v0
  260. new-instance v1, Ljava/lang/AssertionError;
  261. invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
  262. throw v1
  263. .end method