JsonTreeWriter.smali 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. .class public final Lcom/google/gson/internal/bind/JsonTreeWriter;
  2. .super Lcom/google/gson/stream/JsonWriter;
  3. .source ""
  4. # static fields
  5. .field private static final SENTINEL_CLOSED:Lcom/google/gson/JsonPrimitive;
  6. .field private static final UNWRITABLE_WRITER:Ljava/io/Writer;
  7. # instance fields
  8. .field private pendingName:Ljava/lang/String;
  9. .field private product:Lcom/google/gson/JsonElement;
  10. .field private final stack:Ljava/util/List;
  11. .annotation system Ldalvik/annotation/Signature;
  12. value = {
  13. "Ljava/util/List<",
  14. "Lcom/google/gson/JsonElement;",
  15. ">;"
  16. }
  17. .end annotation
  18. .end field
  19. # direct methods
  20. .method static constructor <clinit>()V
  21. .locals 2
  22. new-instance v0, Lcom/google/gson/internal/bind/JsonTreeWriter$1;
  23. invoke-direct {v0}, Lcom/google/gson/internal/bind/JsonTreeWriter$1;-><init>()V
  24. sput-object v0, Lcom/google/gson/internal/bind/JsonTreeWriter;->UNWRITABLE_WRITER:Ljava/io/Writer;
  25. new-instance v0, Lcom/google/gson/JsonPrimitive;
  26. const-string v1, "closed"
  27. invoke-direct {v0, v1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/String;)V
  28. sput-object v0, Lcom/google/gson/internal/bind/JsonTreeWriter;->SENTINEL_CLOSED:Lcom/google/gson/JsonPrimitive;
  29. return-void
  30. .end method
  31. .method public constructor <init>()V
  32. .locals 1
  33. sget-object v0, Lcom/google/gson/internal/bind/JsonTreeWriter;->UNWRITABLE_WRITER:Ljava/io/Writer;
  34. invoke-direct {p0, v0}, Lcom/google/gson/stream/JsonWriter;-><init>(Ljava/io/Writer;)V
  35. new-instance v0, Ljava/util/ArrayList;
  36. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  37. iput-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  38. sget-object v0, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
  39. iput-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->product:Lcom/google/gson/JsonElement;
  40. return-void
  41. .end method
  42. .method private peek()Lcom/google/gson/JsonElement;
  43. .locals 2
  44. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  45. invoke-interface {v0}, Ljava/util/List;->size()I
  46. move-result v1
  47. add-int/lit8 v1, v1, -0x1
  48. invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
  49. move-result-object v0
  50. check-cast v0, Lcom/google/gson/JsonElement;
  51. return-object v0
  52. .end method
  53. .method private put(Lcom/google/gson/JsonElement;)V
  54. .locals 2
  55. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  56. if-eqz v0, :cond_2
  57. invoke-virtual {p1}, Lcom/google/gson/JsonElement;->isJsonNull()Z
  58. move-result v0
  59. if-eqz v0, :cond_0
  60. invoke-virtual {p0}, Lcom/google/gson/stream/JsonWriter;->getSerializeNulls()Z
  61. move-result v0
  62. if-eqz v0, :cond_1
  63. :cond_0
  64. invoke-direct {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->peek()Lcom/google/gson/JsonElement;
  65. move-result-object v0
  66. check-cast v0, Lcom/google/gson/JsonObject;
  67. iget-object v1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  68. invoke-virtual {v0, v1, p1}, Lcom/google/gson/JsonObject;->add(Ljava/lang/String;Lcom/google/gson/JsonElement;)V
  69. :cond_1
  70. const/4 p1, 0x0
  71. iput-object p1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  72. goto :goto_0
  73. :cond_2
  74. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  75. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  76. move-result v0
  77. if-eqz v0, :cond_3
  78. iput-object p1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->product:Lcom/google/gson/JsonElement;
  79. goto :goto_0
  80. :cond_3
  81. invoke-direct {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->peek()Lcom/google/gson/JsonElement;
  82. move-result-object v0
  83. instance-of v1, v0, Lcom/google/gson/JsonArray;
  84. if-eqz v1, :cond_4
  85. check-cast v0, Lcom/google/gson/JsonArray;
  86. invoke-virtual {v0, p1}, Lcom/google/gson/JsonArray;->add(Lcom/google/gson/JsonElement;)V
  87. :goto_0
  88. return-void
  89. :cond_4
  90. new-instance p1, Ljava/lang/IllegalStateException;
  91. invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
  92. throw p1
  93. .end method
  94. # virtual methods
  95. .method public beginArray()Lcom/google/gson/stream/JsonWriter;
  96. .locals 2
  97. .annotation system Ldalvik/annotation/Throws;
  98. value = {
  99. Ljava/io/IOException;
  100. }
  101. .end annotation
  102. new-instance v0, Lcom/google/gson/JsonArray;
  103. invoke-direct {v0}, Lcom/google/gson/JsonArray;-><init>()V
  104. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  105. iget-object v1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  106. invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  107. return-object p0
  108. .end method
  109. .method public beginObject()Lcom/google/gson/stream/JsonWriter;
  110. .locals 2
  111. .annotation system Ldalvik/annotation/Throws;
  112. value = {
  113. Ljava/io/IOException;
  114. }
  115. .end annotation
  116. new-instance v0, Lcom/google/gson/JsonObject;
  117. invoke-direct {v0}, Lcom/google/gson/JsonObject;-><init>()V
  118. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  119. iget-object v1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  120. invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  121. return-object p0
  122. .end method
  123. .method public close()V
  124. .locals 2
  125. .annotation system Ldalvik/annotation/Throws;
  126. value = {
  127. Ljava/io/IOException;
  128. }
  129. .end annotation
  130. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  131. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  132. move-result v0
  133. if-eqz v0, :cond_0
  134. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  135. sget-object v1, Lcom/google/gson/internal/bind/JsonTreeWriter;->SENTINEL_CLOSED:Lcom/google/gson/JsonPrimitive;
  136. invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  137. return-void
  138. :cond_0
  139. new-instance v0, Ljava/io/IOException;
  140. const-string v1, "Incomplete document"
  141. invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
  142. throw v0
  143. .end method
  144. .method public endArray()Lcom/google/gson/stream/JsonWriter;
  145. .locals 2
  146. .annotation system Ldalvik/annotation/Throws;
  147. value = {
  148. Ljava/io/IOException;
  149. }
  150. .end annotation
  151. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  152. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  153. move-result v0
  154. if-nez v0, :cond_1
  155. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  156. if-nez v0, :cond_1
  157. invoke-direct {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->peek()Lcom/google/gson/JsonElement;
  158. move-result-object v0
  159. instance-of v0, v0, Lcom/google/gson/JsonArray;
  160. if-eqz v0, :cond_0
  161. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  162. invoke-interface {v0}, Ljava/util/List;->size()I
  163. move-result v1
  164. add-int/lit8 v1, v1, -0x1
  165. invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  166. return-object p0
  167. :cond_0
  168. new-instance v0, Ljava/lang/IllegalStateException;
  169. invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
  170. throw v0
  171. :cond_1
  172. new-instance v0, Ljava/lang/IllegalStateException;
  173. invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
  174. throw v0
  175. .end method
  176. .method public endObject()Lcom/google/gson/stream/JsonWriter;
  177. .locals 2
  178. .annotation system Ldalvik/annotation/Throws;
  179. value = {
  180. Ljava/io/IOException;
  181. }
  182. .end annotation
  183. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  184. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  185. move-result v0
  186. if-nez v0, :cond_1
  187. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  188. if-nez v0, :cond_1
  189. invoke-direct {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->peek()Lcom/google/gson/JsonElement;
  190. move-result-object v0
  191. instance-of v0, v0, Lcom/google/gson/JsonObject;
  192. if-eqz v0, :cond_0
  193. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  194. invoke-interface {v0}, Ljava/util/List;->size()I
  195. move-result v1
  196. add-int/lit8 v1, v1, -0x1
  197. invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
  198. return-object p0
  199. :cond_0
  200. new-instance v0, Ljava/lang/IllegalStateException;
  201. invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
  202. throw v0
  203. :cond_1
  204. new-instance v0, Ljava/lang/IllegalStateException;
  205. invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
  206. throw v0
  207. .end method
  208. .method public flush()V
  209. .locals 0
  210. .annotation system Ldalvik/annotation/Throws;
  211. value = {
  212. Ljava/io/IOException;
  213. }
  214. .end annotation
  215. return-void
  216. .end method
  217. .method public get()Lcom/google/gson/JsonElement;
  218. .locals 3
  219. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  220. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  221. move-result v0
  222. if-eqz v0, :cond_0
  223. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->product:Lcom/google/gson/JsonElement;
  224. return-object v0
  225. :cond_0
  226. new-instance v0, Ljava/lang/IllegalStateException;
  227. new-instance v1, Ljava/lang/StringBuilder;
  228. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  229. const-string v2, "Expected one JSON element but was "
  230. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  231. iget-object v2, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  232. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  233. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  234. move-result-object v1
  235. invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  236. throw v0
  237. .end method
  238. .method public name(Ljava/lang/String;)Lcom/google/gson/stream/JsonWriter;
  239. .locals 1
  240. .annotation system Ldalvik/annotation/Throws;
  241. value = {
  242. Ljava/io/IOException;
  243. }
  244. .end annotation
  245. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->stack:Ljava/util/List;
  246. invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
  247. move-result v0
  248. if-nez v0, :cond_1
  249. iget-object v0, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  250. if-nez v0, :cond_1
  251. invoke-direct {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->peek()Lcom/google/gson/JsonElement;
  252. move-result-object v0
  253. instance-of v0, v0, Lcom/google/gson/JsonObject;
  254. if-eqz v0, :cond_0
  255. iput-object p1, p0, Lcom/google/gson/internal/bind/JsonTreeWriter;->pendingName:Ljava/lang/String;
  256. return-object p0
  257. :cond_0
  258. new-instance p1, Ljava/lang/IllegalStateException;
  259. invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
  260. throw p1
  261. :cond_1
  262. new-instance p1, Ljava/lang/IllegalStateException;
  263. invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
  264. throw p1
  265. .end method
  266. .method public nullValue()Lcom/google/gson/stream/JsonWriter;
  267. .locals 1
  268. .annotation system Ldalvik/annotation/Throws;
  269. value = {
  270. Ljava/io/IOException;
  271. }
  272. .end annotation
  273. sget-object v0, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
  274. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  275. return-object p0
  276. .end method
  277. .method public value(D)Lcom/google/gson/stream/JsonWriter;
  278. .locals 3
  279. .annotation system Ldalvik/annotation/Throws;
  280. value = {
  281. Ljava/io/IOException;
  282. }
  283. .end annotation
  284. invoke-virtual {p0}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
  285. move-result v0
  286. if-nez v0, :cond_1
  287. invoke-static {p1, p2}, Ljava/lang/Double;->isNaN(D)Z
  288. move-result v0
  289. if-nez v0, :cond_0
  290. invoke-static {p1, p2}, Ljava/lang/Double;->isInfinite(D)Z
  291. move-result v0
  292. if-nez v0, :cond_0
  293. goto :goto_0
  294. :cond_0
  295. new-instance v0, Ljava/lang/IllegalArgumentException;
  296. new-instance v1, Ljava/lang/StringBuilder;
  297. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  298. const-string v2, "JSON forbids NaN and infinities: "
  299. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  300. invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;
  301. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  302. move-result-object p1
  303. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  304. throw v0
  305. :cond_1
  306. :goto_0
  307. new-instance v0, Lcom/google/gson/JsonPrimitive;
  308. invoke-static {p1, p2}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
  309. move-result-object p1
  310. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/Number;)V
  311. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  312. return-object p0
  313. .end method
  314. .method public value(J)Lcom/google/gson/stream/JsonWriter;
  315. .locals 1
  316. .annotation system Ldalvik/annotation/Throws;
  317. value = {
  318. Ljava/io/IOException;
  319. }
  320. .end annotation
  321. new-instance v0, Lcom/google/gson/JsonPrimitive;
  322. invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
  323. move-result-object p1
  324. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/Number;)V
  325. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  326. return-object p0
  327. .end method
  328. .method public value(Ljava/lang/Boolean;)Lcom/google/gson/stream/JsonWriter;
  329. .locals 1
  330. .annotation system Ldalvik/annotation/Throws;
  331. value = {
  332. Ljava/io/IOException;
  333. }
  334. .end annotation
  335. if-nez p1, :cond_0
  336. invoke-virtual {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->nullValue()Lcom/google/gson/stream/JsonWriter;
  337. move-result-object p1
  338. return-object p1
  339. :cond_0
  340. new-instance v0, Lcom/google/gson/JsonPrimitive;
  341. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/Boolean;)V
  342. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  343. return-object p0
  344. .end method
  345. .method public value(Ljava/lang/Number;)Lcom/google/gson/stream/JsonWriter;
  346. .locals 3
  347. .annotation system Ldalvik/annotation/Throws;
  348. value = {
  349. Ljava/io/IOException;
  350. }
  351. .end annotation
  352. if-nez p1, :cond_0
  353. invoke-virtual {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->nullValue()Lcom/google/gson/stream/JsonWriter;
  354. move-result-object p1
  355. return-object p1
  356. :cond_0
  357. invoke-virtual {p0}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
  358. move-result v0
  359. if-nez v0, :cond_2
  360. invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D
  361. move-result-wide v0
  362. invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z
  363. move-result v2
  364. if-nez v2, :cond_1
  365. invoke-static {v0, v1}, Ljava/lang/Double;->isInfinite(D)Z
  366. move-result v0
  367. if-nez v0, :cond_1
  368. goto :goto_0
  369. :cond_1
  370. new-instance v0, Ljava/lang/IllegalArgumentException;
  371. new-instance v1, Ljava/lang/StringBuilder;
  372. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  373. const-string v2, "JSON forbids NaN and infinities: "
  374. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  375. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  376. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  377. move-result-object p1
  378. invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  379. throw v0
  380. :cond_2
  381. :goto_0
  382. new-instance v0, Lcom/google/gson/JsonPrimitive;
  383. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/Number;)V
  384. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  385. return-object p0
  386. .end method
  387. .method public value(Ljava/lang/String;)Lcom/google/gson/stream/JsonWriter;
  388. .locals 1
  389. .annotation system Ldalvik/annotation/Throws;
  390. value = {
  391. Ljava/io/IOException;
  392. }
  393. .end annotation
  394. if-nez p1, :cond_0
  395. invoke-virtual {p0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->nullValue()Lcom/google/gson/stream/JsonWriter;
  396. move-result-object p1
  397. return-object p1
  398. :cond_0
  399. new-instance v0, Lcom/google/gson/JsonPrimitive;
  400. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/String;)V
  401. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  402. return-object p0
  403. .end method
  404. .method public value(Z)Lcom/google/gson/stream/JsonWriter;
  405. .locals 1
  406. .annotation system Ldalvik/annotation/Throws;
  407. value = {
  408. Ljava/io/IOException;
  409. }
  410. .end annotation
  411. new-instance v0, Lcom/google/gson/JsonPrimitive;
  412. invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
  413. move-result-object p1
  414. invoke-direct {v0, p1}, Lcom/google/gson/JsonPrimitive;-><init>(Ljava/lang/Boolean;)V
  415. invoke-direct {p0, v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->put(Lcom/google/gson/JsonElement;)V
  416. return-object p0
  417. .end method