JsonPrimitive.smali 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. .class public final Lcom/google/gson/JsonPrimitive;
  2. .super Lcom/google/gson/JsonElement;
  3. .source ""
  4. # static fields
  5. .field private static final PRIMITIVE_TYPES:[Ljava/lang/Class;
  6. .annotation system Ldalvik/annotation/Signature;
  7. value = {
  8. "[",
  9. "Ljava/lang/Class<",
  10. "*>;"
  11. }
  12. .end annotation
  13. .end field
  14. # instance fields
  15. .field private value:Ljava/lang/Object;
  16. # direct methods
  17. .method static constructor <clinit>()V
  18. .locals 3
  19. const/16 v0, 0x10
  20. new-array v0, v0, [Ljava/lang/Class;
  21. sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
  22. const/4 v2, 0x0
  23. aput-object v1, v0, v2
  24. sget-object v1, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
  25. const/4 v2, 0x1
  26. aput-object v1, v0, v2
  27. sget-object v1, Ljava/lang/Short;->TYPE:Ljava/lang/Class;
  28. const/4 v2, 0x2
  29. aput-object v1, v0, v2
  30. sget-object v1, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
  31. const/4 v2, 0x3
  32. aput-object v1, v0, v2
  33. sget-object v1, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
  34. const/4 v2, 0x4
  35. aput-object v1, v0, v2
  36. sget-object v1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
  37. const/4 v2, 0x5
  38. aput-object v1, v0, v2
  39. sget-object v1, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
  40. const/4 v2, 0x6
  41. aput-object v1, v0, v2
  42. sget-object v1, Ljava/lang/Character;->TYPE:Ljava/lang/Class;
  43. const/4 v2, 0x7
  44. aput-object v1, v0, v2
  45. const-class v1, Ljava/lang/Integer;
  46. const/16 v2, 0x8
  47. aput-object v1, v0, v2
  48. const-class v1, Ljava/lang/Long;
  49. const/16 v2, 0x9
  50. aput-object v1, v0, v2
  51. const-class v1, Ljava/lang/Short;
  52. const/16 v2, 0xa
  53. aput-object v1, v0, v2
  54. const-class v1, Ljava/lang/Float;
  55. const/16 v2, 0xb
  56. aput-object v1, v0, v2
  57. const-class v1, Ljava/lang/Double;
  58. const/16 v2, 0xc
  59. aput-object v1, v0, v2
  60. const-class v1, Ljava/lang/Byte;
  61. const/16 v2, 0xd
  62. aput-object v1, v0, v2
  63. const-class v1, Ljava/lang/Boolean;
  64. const/16 v2, 0xe
  65. aput-object v1, v0, v2
  66. const-class v1, Ljava/lang/Character;
  67. const/16 v2, 0xf
  68. aput-object v1, v0, v2
  69. sput-object v0, Lcom/google/gson/JsonPrimitive;->PRIMITIVE_TYPES:[Ljava/lang/Class;
  70. return-void
  71. .end method
  72. .method public constructor <init>(Ljava/lang/Boolean;)V
  73. .locals 0
  74. invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
  75. invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V
  76. return-void
  77. .end method
  78. .method public constructor <init>(Ljava/lang/Character;)V
  79. .locals 0
  80. invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
  81. invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V
  82. return-void
  83. .end method
  84. .method public constructor <init>(Ljava/lang/Number;)V
  85. .locals 0
  86. invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
  87. invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V
  88. return-void
  89. .end method
  90. .method constructor <init>(Ljava/lang/Object;)V
  91. .locals 0
  92. invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
  93. invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V
  94. return-void
  95. .end method
  96. .method public constructor <init>(Ljava/lang/String;)V
  97. .locals 0
  98. invoke-direct {p0}, Lcom/google/gson/JsonElement;-><init>()V
  99. invoke-virtual {p0, p1}, Lcom/google/gson/JsonPrimitive;->setValue(Ljava/lang/Object;)V
  100. return-void
  101. .end method
  102. .method private static isIntegral(Lcom/google/gson/JsonPrimitive;)Z
  103. .locals 2
  104. iget-object p0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  105. instance-of v0, p0, Ljava/lang/Number;
  106. const/4 v1, 0x0
  107. if-eqz v0, :cond_1
  108. check-cast p0, Ljava/lang/Number;
  109. instance-of v0, p0, Ljava/math/BigInteger;
  110. if-nez v0, :cond_0
  111. instance-of v0, p0, Ljava/lang/Long;
  112. if-nez v0, :cond_0
  113. instance-of v0, p0, Ljava/lang/Integer;
  114. if-nez v0, :cond_0
  115. instance-of v0, p0, Ljava/lang/Short;
  116. if-nez v0, :cond_0
  117. instance-of p0, p0, Ljava/lang/Byte;
  118. if-eqz p0, :cond_1
  119. :cond_0
  120. const/4 v1, 0x1
  121. :cond_1
  122. return v1
  123. .end method
  124. .method private static isPrimitiveOrString(Ljava/lang/Object;)Z
  125. .locals 6
  126. instance-of v0, p0, Ljava/lang/String;
  127. const/4 v1, 0x1
  128. if-eqz v0, :cond_0
  129. return v1
  130. :cond_0
  131. invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  132. move-result-object p0
  133. sget-object v0, Lcom/google/gson/JsonPrimitive;->PRIMITIVE_TYPES:[Ljava/lang/Class;
  134. array-length v2, v0
  135. const/4 v3, 0x0
  136. const/4 v4, 0x0
  137. :goto_0
  138. if-ge v4, v2, :cond_2
  139. aget-object v5, v0, v4
  140. invoke-virtual {v5, p0}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
  141. move-result v5
  142. if-eqz v5, :cond_1
  143. return v1
  144. :cond_1
  145. add-int/lit8 v4, v4, 0x1
  146. goto :goto_0
  147. :cond_2
  148. return v3
  149. .end method
  150. # virtual methods
  151. .method bridge synthetic deepCopy()Lcom/google/gson/JsonElement;
  152. .locals 1
  153. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->deepCopy()Lcom/google/gson/JsonPrimitive;
  154. move-result-object v0
  155. return-object v0
  156. .end method
  157. .method deepCopy()Lcom/google/gson/JsonPrimitive;
  158. .locals 0
  159. return-object p0
  160. .end method
  161. .method public equals(Ljava/lang/Object;)Z
  162. .locals 6
  163. const/4 v0, 0x1
  164. if-ne p0, p1, :cond_0
  165. return v0
  166. :cond_0
  167. const/4 v1, 0x0
  168. if-eqz p1, :cond_9
  169. const-class v2, Lcom/google/gson/JsonPrimitive;
  170. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  171. move-result-object v3
  172. if-eq v2, v3, :cond_1
  173. goto :goto_3
  174. :cond_1
  175. check-cast p1, Lcom/google/gson/JsonPrimitive;
  176. iget-object v2, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  177. if-nez v2, :cond_3
  178. iget-object p1, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  179. if-nez p1, :cond_2
  180. goto :goto_0
  181. :cond_2
  182. const/4 v0, 0x0
  183. :goto_0
  184. return v0
  185. :cond_3
  186. invoke-static {p0}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z
  187. move-result v2
  188. if-eqz v2, :cond_5
  189. invoke-static {p1}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z
  190. move-result v2
  191. if-eqz v2, :cond_5
  192. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  193. move-result-object v2
  194. invoke-virtual {v2}, Ljava/lang/Number;->longValue()J
  195. move-result-wide v2
  196. invoke-virtual {p1}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  197. move-result-object p1
  198. invoke-virtual {p1}, Ljava/lang/Number;->longValue()J
  199. move-result-wide v4
  200. cmp-long p1, v2, v4
  201. if-nez p1, :cond_4
  202. goto :goto_1
  203. :cond_4
  204. const/4 v0, 0x0
  205. :goto_1
  206. return v0
  207. :cond_5
  208. iget-object v2, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  209. instance-of v2, v2, Ljava/lang/Number;
  210. if-eqz v2, :cond_8
  211. iget-object v2, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  212. instance-of v2, v2, Ljava/lang/Number;
  213. if-eqz v2, :cond_8
  214. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  215. move-result-object v2
  216. invoke-virtual {v2}, Ljava/lang/Number;->doubleValue()D
  217. move-result-wide v2
  218. invoke-virtual {p1}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  219. move-result-object p1
  220. invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D
  221. move-result-wide v4
  222. cmpl-double p1, v2, v4
  223. if-eqz p1, :cond_7
  224. invoke-static {v2, v3}, Ljava/lang/Double;->isNaN(D)Z
  225. move-result p1
  226. if-eqz p1, :cond_6
  227. invoke-static {v4, v5}, Ljava/lang/Double;->isNaN(D)Z
  228. move-result p1
  229. if-eqz p1, :cond_6
  230. goto :goto_2
  231. :cond_6
  232. const/4 v0, 0x0
  233. :cond_7
  234. :goto_2
  235. return v0
  236. :cond_8
  237. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  238. iget-object p1, p1, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  239. invoke-virtual {v0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
  240. move-result p1
  241. return p1
  242. :cond_9
  243. :goto_3
  244. return v1
  245. .end method
  246. .method public getAsBigDecimal()Ljava/math/BigDecimal;
  247. .locals 2
  248. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  249. instance-of v1, v0, Ljava/math/BigDecimal;
  250. if-eqz v1, :cond_0
  251. check-cast v0, Ljava/math/BigDecimal;
  252. goto :goto_0
  253. :cond_0
  254. new-instance v1, Ljava/math/BigDecimal;
  255. invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
  256. move-result-object v0
  257. invoke-direct {v1, v0}, Ljava/math/BigDecimal;-><init>(Ljava/lang/String;)V
  258. move-object v0, v1
  259. :goto_0
  260. return-object v0
  261. .end method
  262. .method public getAsBigInteger()Ljava/math/BigInteger;
  263. .locals 2
  264. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  265. instance-of v1, v0, Ljava/math/BigInteger;
  266. if-eqz v1, :cond_0
  267. check-cast v0, Ljava/math/BigInteger;
  268. goto :goto_0
  269. :cond_0
  270. new-instance v1, Ljava/math/BigInteger;
  271. invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
  272. move-result-object v0
  273. invoke-direct {v1, v0}, Ljava/math/BigInteger;-><init>(Ljava/lang/String;)V
  274. move-object v0, v1
  275. :goto_0
  276. return-object v0
  277. .end method
  278. .method public getAsBoolean()Z
  279. .locals 1
  280. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isBoolean()Z
  281. move-result v0
  282. if-eqz v0, :cond_0
  283. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsBooleanWrapper()Ljava/lang/Boolean;
  284. move-result-object v0
  285. invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
  286. move-result v0
  287. return v0
  288. :cond_0
  289. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  290. move-result-object v0
  291. invoke-static {v0}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z
  292. move-result v0
  293. return v0
  294. .end method
  295. .method getAsBooleanWrapper()Ljava/lang/Boolean;
  296. .locals 1
  297. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  298. check-cast v0, Ljava/lang/Boolean;
  299. return-object v0
  300. .end method
  301. .method public getAsByte()B
  302. .locals 1
  303. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  304. move-result v0
  305. if-eqz v0, :cond_0
  306. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  307. move-result-object v0
  308. invoke-virtual {v0}, Ljava/lang/Number;->byteValue()B
  309. move-result v0
  310. goto :goto_0
  311. :cond_0
  312. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  313. move-result-object v0
  314. invoke-static {v0}, Ljava/lang/Byte;->parseByte(Ljava/lang/String;)B
  315. move-result v0
  316. :goto_0
  317. return v0
  318. .end method
  319. .method public getAsCharacter()C
  320. .locals 2
  321. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  322. move-result-object v0
  323. const/4 v1, 0x0
  324. invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C
  325. move-result v0
  326. return v0
  327. .end method
  328. .method public getAsDouble()D
  329. .locals 2
  330. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  331. move-result v0
  332. if-eqz v0, :cond_0
  333. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  334. move-result-object v0
  335. invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
  336. move-result-wide v0
  337. goto :goto_0
  338. :cond_0
  339. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  340. move-result-object v0
  341. invoke-static {v0}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D
  342. move-result-wide v0
  343. :goto_0
  344. return-wide v0
  345. .end method
  346. .method public getAsFloat()F
  347. .locals 1
  348. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  349. move-result v0
  350. if-eqz v0, :cond_0
  351. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  352. move-result-object v0
  353. invoke-virtual {v0}, Ljava/lang/Number;->floatValue()F
  354. move-result v0
  355. goto :goto_0
  356. :cond_0
  357. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  358. move-result-object v0
  359. invoke-static {v0}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F
  360. move-result v0
  361. :goto_0
  362. return v0
  363. .end method
  364. .method public getAsInt()I
  365. .locals 1
  366. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  367. move-result v0
  368. if-eqz v0, :cond_0
  369. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  370. move-result-object v0
  371. invoke-virtual {v0}, Ljava/lang/Number;->intValue()I
  372. move-result v0
  373. goto :goto_0
  374. :cond_0
  375. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  376. move-result-object v0
  377. invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
  378. move-result v0
  379. :goto_0
  380. return v0
  381. .end method
  382. .method public getAsLong()J
  383. .locals 2
  384. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  385. move-result v0
  386. if-eqz v0, :cond_0
  387. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  388. move-result-object v0
  389. invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
  390. move-result-wide v0
  391. goto :goto_0
  392. :cond_0
  393. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  394. move-result-object v0
  395. invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
  396. move-result-wide v0
  397. :goto_0
  398. return-wide v0
  399. .end method
  400. .method public getAsNumber()Ljava/lang/Number;
  401. .locals 2
  402. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  403. instance-of v1, v0, Ljava/lang/String;
  404. if-eqz v1, :cond_0
  405. new-instance v1, Lcom/google/gson/internal/LazilyParsedNumber;
  406. check-cast v0, Ljava/lang/String;
  407. invoke-direct {v1, v0}, Lcom/google/gson/internal/LazilyParsedNumber;-><init>(Ljava/lang/String;)V
  408. goto :goto_0
  409. :cond_0
  410. move-object v1, v0
  411. check-cast v1, Ljava/lang/Number;
  412. :goto_0
  413. return-object v1
  414. .end method
  415. .method public getAsShort()S
  416. .locals 1
  417. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  418. move-result v0
  419. if-eqz v0, :cond_0
  420. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  421. move-result-object v0
  422. invoke-virtual {v0}, Ljava/lang/Number;->shortValue()S
  423. move-result v0
  424. goto :goto_0
  425. :cond_0
  426. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsString()Ljava/lang/String;
  427. move-result-object v0
  428. invoke-static {v0}, Ljava/lang/Short;->parseShort(Ljava/lang/String;)S
  429. move-result v0
  430. :goto_0
  431. return v0
  432. .end method
  433. .method public getAsString()Ljava/lang/String;
  434. .locals 1
  435. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isNumber()Z
  436. move-result v0
  437. if-eqz v0, :cond_0
  438. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  439. move-result-object v0
  440. invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
  441. move-result-object v0
  442. return-object v0
  443. :cond_0
  444. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->isBoolean()Z
  445. move-result v0
  446. if-eqz v0, :cond_1
  447. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsBooleanWrapper()Ljava/lang/Boolean;
  448. move-result-object v0
  449. invoke-virtual {v0}, Ljava/lang/Boolean;->toString()Ljava/lang/String;
  450. move-result-object v0
  451. return-object v0
  452. :cond_1
  453. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  454. check-cast v0, Ljava/lang/String;
  455. return-object v0
  456. .end method
  457. .method public hashCode()I
  458. .locals 4
  459. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  460. if-nez v0, :cond_0
  461. const/16 v0, 0x1f
  462. return v0
  463. :cond_0
  464. invoke-static {p0}, Lcom/google/gson/JsonPrimitive;->isIntegral(Lcom/google/gson/JsonPrimitive;)Z
  465. move-result v0
  466. const/16 v1, 0x20
  467. if-eqz v0, :cond_1
  468. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  469. move-result-object v0
  470. invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
  471. move-result-wide v2
  472. :goto_0
  473. ushr-long v0, v2, v1
  474. xor-long/2addr v0, v2
  475. long-to-int v1, v0
  476. return v1
  477. :cond_1
  478. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  479. instance-of v2, v0, Ljava/lang/Number;
  480. if-eqz v2, :cond_2
  481. invoke-virtual {p0}, Lcom/google/gson/JsonPrimitive;->getAsNumber()Ljava/lang/Number;
  482. move-result-object v0
  483. invoke-virtual {v0}, Ljava/lang/Number;->doubleValue()D
  484. move-result-wide v2
  485. invoke-static {v2, v3}, Ljava/lang/Double;->doubleToLongBits(D)J
  486. move-result-wide v2
  487. goto :goto_0
  488. :cond_2
  489. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  490. move-result v0
  491. return v0
  492. .end method
  493. .method public isBoolean()Z
  494. .locals 1
  495. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  496. instance-of v0, v0, Ljava/lang/Boolean;
  497. return v0
  498. .end method
  499. .method public isNumber()Z
  500. .locals 1
  501. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  502. instance-of v0, v0, Ljava/lang/Number;
  503. return v0
  504. .end method
  505. .method public isString()Z
  506. .locals 1
  507. iget-object v0, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  508. instance-of v0, v0, Ljava/lang/String;
  509. return v0
  510. .end method
  511. .method setValue(Ljava/lang/Object;)V
  512. .locals 1
  513. instance-of v0, p1, Ljava/lang/Character;
  514. if-eqz v0, :cond_0
  515. check-cast p1, Ljava/lang/Character;
  516. invoke-virtual {p1}, Ljava/lang/Character;->charValue()C
  517. move-result p1
  518. invoke-static {p1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;
  519. move-result-object p1
  520. :goto_0
  521. iput-object p1, p0, Lcom/google/gson/JsonPrimitive;->value:Ljava/lang/Object;
  522. goto :goto_3
  523. :cond_0
  524. instance-of v0, p1, Ljava/lang/Number;
  525. if-nez v0, :cond_2
  526. invoke-static {p1}, Lcom/google/gson/JsonPrimitive;->isPrimitiveOrString(Ljava/lang/Object;)Z
  527. move-result v0
  528. if-eqz v0, :cond_1
  529. goto :goto_1
  530. :cond_1
  531. const/4 v0, 0x0
  532. goto :goto_2
  533. :cond_2
  534. :goto_1
  535. const/4 v0, 0x1
  536. :goto_2
  537. invoke-static {v0}, Lcom/google/gson/internal/$Gson$Preconditions;->checkArgument(Z)V
  538. goto :goto_0
  539. :goto_3
  540. return-void
  541. .end method