GsonBuilder.smali 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. .class public final Lcom/google/gson/GsonBuilder;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # instance fields
  5. .field private complexMapKeySerialization:Z
  6. .field private datePattern:Ljava/lang/String;
  7. .field private dateStyle:I
  8. .field private escapeHtmlChars:Z
  9. .field private excluder:Lcom/google/gson/internal/Excluder;
  10. .field private final factories:Ljava/util/List;
  11. .annotation system Ldalvik/annotation/Signature;
  12. value = {
  13. "Ljava/util/List<",
  14. "Lcom/google/gson/TypeAdapterFactory;",
  15. ">;"
  16. }
  17. .end annotation
  18. .end field
  19. .field private fieldNamingPolicy:Lcom/google/gson/FieldNamingStrategy;
  20. .field private generateNonExecutableJson:Z
  21. .field private final hierarchyFactories:Ljava/util/List;
  22. .annotation system Ldalvik/annotation/Signature;
  23. value = {
  24. "Ljava/util/List<",
  25. "Lcom/google/gson/TypeAdapterFactory;",
  26. ">;"
  27. }
  28. .end annotation
  29. .end field
  30. .field private final instanceCreators:Ljava/util/Map;
  31. .annotation system Ldalvik/annotation/Signature;
  32. value = {
  33. "Ljava/util/Map<",
  34. "Ljava/lang/reflect/Type;",
  35. "Lcom/google/gson/InstanceCreator<",
  36. "*>;>;"
  37. }
  38. .end annotation
  39. .end field
  40. .field private lenient:Z
  41. .field private longSerializationPolicy:Lcom/google/gson/LongSerializationPolicy;
  42. .field private prettyPrinting:Z
  43. .field private serializeNulls:Z
  44. .field private serializeSpecialFloatingPointValues:Z
  45. .field private timeStyle:I
  46. # direct methods
  47. .method public constructor <init>()V
  48. .locals 2
  49. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  50. sget-object v0, Lcom/google/gson/internal/Excluder;->DEFAULT:Lcom/google/gson/internal/Excluder;
  51. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  52. sget-object v0, Lcom/google/gson/LongSerializationPolicy;->DEFAULT:Lcom/google/gson/LongSerializationPolicy;
  53. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->longSerializationPolicy:Lcom/google/gson/LongSerializationPolicy;
  54. sget-object v0, Lcom/google/gson/FieldNamingPolicy;->IDENTITY:Lcom/google/gson/FieldNamingPolicy;
  55. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->fieldNamingPolicy:Lcom/google/gson/FieldNamingStrategy;
  56. new-instance v0, Ljava/util/HashMap;
  57. invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
  58. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->instanceCreators:Ljava/util/Map;
  59. new-instance v0, Ljava/util/ArrayList;
  60. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  61. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  62. new-instance v0, Ljava/util/ArrayList;
  63. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  64. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->hierarchyFactories:Ljava/util/List;
  65. const/4 v0, 0x0
  66. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->serializeNulls:Z
  67. const/4 v1, 0x2
  68. iput v1, p0, Lcom/google/gson/GsonBuilder;->dateStyle:I
  69. iput v1, p0, Lcom/google/gson/GsonBuilder;->timeStyle:I
  70. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->complexMapKeySerialization:Z
  71. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->serializeSpecialFloatingPointValues:Z
  72. const/4 v1, 0x1
  73. iput-boolean v1, p0, Lcom/google/gson/GsonBuilder;->escapeHtmlChars:Z
  74. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->prettyPrinting:Z
  75. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->generateNonExecutableJson:Z
  76. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->lenient:Z
  77. return-void
  78. .end method
  79. .method private addTypeAdaptersForDate(Ljava/lang/String;IILjava/util/List;)V
  80. .locals 3
  81. .annotation system Ldalvik/annotation/Signature;
  82. value = {
  83. "(",
  84. "Ljava/lang/String;",
  85. "II",
  86. "Ljava/util/List<",
  87. "Lcom/google/gson/TypeAdapterFactory;",
  88. ">;)V"
  89. }
  90. .end annotation
  91. if-eqz p1, :cond_0
  92. invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;
  93. move-result-object v0
  94. const-string v1, ""
  95. invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  96. move-result v0
  97. if-nez v0, :cond_0
  98. new-instance p2, Lcom/google/gson/DefaultDateTypeAdapter;
  99. const-class p3, Ljava/util/Date;
  100. invoke-direct {p2, p3, p1}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;Ljava/lang/String;)V
  101. new-instance p3, Lcom/google/gson/DefaultDateTypeAdapter;
  102. const-class v0, Ljava/sql/Timestamp;
  103. invoke-direct {p3, v0, p1}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;Ljava/lang/String;)V
  104. new-instance v0, Lcom/google/gson/DefaultDateTypeAdapter;
  105. const-class v1, Ljava/sql/Date;
  106. invoke-direct {v0, v1, p1}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;Ljava/lang/String;)V
  107. move-object p1, p2
  108. goto :goto_0
  109. :cond_0
  110. const/4 p1, 0x2
  111. if-eq p2, p1, :cond_1
  112. if-eq p3, p1, :cond_1
  113. new-instance p1, Lcom/google/gson/DefaultDateTypeAdapter;
  114. const-class v0, Ljava/util/Date;
  115. invoke-direct {p1, v0, p2, p3}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;II)V
  116. new-instance v0, Lcom/google/gson/DefaultDateTypeAdapter;
  117. const-class v1, Ljava/sql/Timestamp;
  118. invoke-direct {v0, v1, p2, p3}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;II)V
  119. new-instance v1, Lcom/google/gson/DefaultDateTypeAdapter;
  120. const-class v2, Ljava/sql/Date;
  121. invoke-direct {v1, v2, p2, p3}, Lcom/google/gson/DefaultDateTypeAdapter;-><init>(Ljava/lang/Class;II)V
  122. move-object p3, v0
  123. move-object v0, v1
  124. :goto_0
  125. const-class p2, Ljava/util/Date;
  126. invoke-static {p2, p1}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  127. move-result-object p1
  128. invoke-interface {p4, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  129. const-class p1, Ljava/sql/Timestamp;
  130. invoke-static {p1, p3}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  131. move-result-object p1
  132. invoke-interface {p4, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  133. const-class p1, Ljava/sql/Date;
  134. invoke-static {p1, v0}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  135. move-result-object p1
  136. invoke-interface {p4, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  137. :cond_1
  138. return-void
  139. .end method
  140. # virtual methods
  141. .method public addDeserializationExclusionStrategy(Lcom/google/gson/ExclusionStrategy;)Lcom/google/gson/GsonBuilder;
  142. .locals 3
  143. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  144. const/4 v1, 0x0
  145. const/4 v2, 0x1
  146. invoke-virtual {v0, p1, v1, v2}, Lcom/google/gson/internal/Excluder;->withExclusionStrategy(Lcom/google/gson/ExclusionStrategy;ZZ)Lcom/google/gson/internal/Excluder;
  147. move-result-object p1
  148. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  149. return-object p0
  150. .end method
  151. .method public addSerializationExclusionStrategy(Lcom/google/gson/ExclusionStrategy;)Lcom/google/gson/GsonBuilder;
  152. .locals 3
  153. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  154. const/4 v1, 0x1
  155. const/4 v2, 0x0
  156. invoke-virtual {v0, p1, v1, v2}, Lcom/google/gson/internal/Excluder;->withExclusionStrategy(Lcom/google/gson/ExclusionStrategy;ZZ)Lcom/google/gson/internal/Excluder;
  157. move-result-object p1
  158. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  159. return-object p0
  160. .end method
  161. .method public create()Lcom/google/gson/Gson;
  162. .locals 14
  163. new-instance v12, Ljava/util/ArrayList;
  164. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  165. invoke-interface {v0}, Ljava/util/List;->size()I
  166. move-result v0
  167. iget-object v1, p0, Lcom/google/gson/GsonBuilder;->hierarchyFactories:Ljava/util/List;
  168. invoke-interface {v1}, Ljava/util/List;->size()I
  169. move-result v1
  170. add-int/2addr v0, v1
  171. add-int/lit8 v0, v0, 0x3
  172. invoke-direct {v12, v0}, Ljava/util/ArrayList;-><init>(I)V
  173. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  174. invoke-interface {v12, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  175. invoke-static {v12}, Ljava/util/Collections;->reverse(Ljava/util/List;)V
  176. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->hierarchyFactories:Ljava/util/List;
  177. invoke-static {v0}, Ljava/util/Collections;->reverse(Ljava/util/List;)V
  178. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->hierarchyFactories:Ljava/util/List;
  179. invoke-interface {v12, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  180. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->datePattern:Ljava/lang/String;
  181. iget v1, p0, Lcom/google/gson/GsonBuilder;->dateStyle:I
  182. iget v2, p0, Lcom/google/gson/GsonBuilder;->timeStyle:I
  183. invoke-direct {p0, v0, v1, v2, v12}, Lcom/google/gson/GsonBuilder;->addTypeAdaptersForDate(Ljava/lang/String;IILjava/util/List;)V
  184. new-instance v13, Lcom/google/gson/Gson;
  185. iget-object v1, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  186. iget-object v2, p0, Lcom/google/gson/GsonBuilder;->fieldNamingPolicy:Lcom/google/gson/FieldNamingStrategy;
  187. iget-object v3, p0, Lcom/google/gson/GsonBuilder;->instanceCreators:Ljava/util/Map;
  188. iget-boolean v4, p0, Lcom/google/gson/GsonBuilder;->serializeNulls:Z
  189. iget-boolean v5, p0, Lcom/google/gson/GsonBuilder;->complexMapKeySerialization:Z
  190. iget-boolean v6, p0, Lcom/google/gson/GsonBuilder;->generateNonExecutableJson:Z
  191. iget-boolean v7, p0, Lcom/google/gson/GsonBuilder;->escapeHtmlChars:Z
  192. iget-boolean v8, p0, Lcom/google/gson/GsonBuilder;->prettyPrinting:Z
  193. iget-boolean v9, p0, Lcom/google/gson/GsonBuilder;->lenient:Z
  194. iget-boolean v10, p0, Lcom/google/gson/GsonBuilder;->serializeSpecialFloatingPointValues:Z
  195. iget-object v11, p0, Lcom/google/gson/GsonBuilder;->longSerializationPolicy:Lcom/google/gson/LongSerializationPolicy;
  196. move-object v0, v13
  197. invoke-direct/range {v0 .. v12}, Lcom/google/gson/Gson;-><init>(Lcom/google/gson/internal/Excluder;Lcom/google/gson/FieldNamingStrategy;Ljava/util/Map;ZZZZZZZLcom/google/gson/LongSerializationPolicy;Ljava/util/List;)V
  198. return-object v13
  199. .end method
  200. .method public disableHtmlEscaping()Lcom/google/gson/GsonBuilder;
  201. .locals 1
  202. const/4 v0, 0x0
  203. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->escapeHtmlChars:Z
  204. return-object p0
  205. .end method
  206. .method public disableInnerClassSerialization()Lcom/google/gson/GsonBuilder;
  207. .locals 1
  208. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  209. invoke-virtual {v0}, Lcom/google/gson/internal/Excluder;->disableInnerClassSerialization()Lcom/google/gson/internal/Excluder;
  210. move-result-object v0
  211. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  212. return-object p0
  213. .end method
  214. .method public enableComplexMapKeySerialization()Lcom/google/gson/GsonBuilder;
  215. .locals 1
  216. const/4 v0, 0x1
  217. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->complexMapKeySerialization:Z
  218. return-object p0
  219. .end method
  220. .method public varargs excludeFieldsWithModifiers([I)Lcom/google/gson/GsonBuilder;
  221. .locals 1
  222. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  223. invoke-virtual {v0, p1}, Lcom/google/gson/internal/Excluder;->withModifiers([I)Lcom/google/gson/internal/Excluder;
  224. move-result-object p1
  225. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  226. return-object p0
  227. .end method
  228. .method public excludeFieldsWithoutExposeAnnotation()Lcom/google/gson/GsonBuilder;
  229. .locals 1
  230. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  231. invoke-virtual {v0}, Lcom/google/gson/internal/Excluder;->excludeFieldsWithoutExposeAnnotation()Lcom/google/gson/internal/Excluder;
  232. move-result-object v0
  233. iput-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  234. return-object p0
  235. .end method
  236. .method public generateNonExecutableJson()Lcom/google/gson/GsonBuilder;
  237. .locals 1
  238. const/4 v0, 0x1
  239. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->generateNonExecutableJson:Z
  240. return-object p0
  241. .end method
  242. .method public registerTypeAdapter(Ljava/lang/reflect/Type;Ljava/lang/Object;)Lcom/google/gson/GsonBuilder;
  243. .locals 3
  244. instance-of v0, p2, Lcom/google/gson/JsonSerializer;
  245. if-nez v0, :cond_1
  246. instance-of v1, p2, Lcom/google/gson/JsonDeserializer;
  247. if-nez v1, :cond_1
  248. instance-of v1, p2, Lcom/google/gson/InstanceCreator;
  249. if-nez v1, :cond_1
  250. instance-of v1, p2, Lcom/google/gson/TypeAdapter;
  251. if-eqz v1, :cond_0
  252. goto :goto_0
  253. :cond_0
  254. const/4 v1, 0x0
  255. goto :goto_1
  256. :cond_1
  257. :goto_0
  258. const/4 v1, 0x1
  259. :goto_1
  260. invoke-static {v1}, Lcom/google/gson/internal/$Gson$Preconditions;->checkArgument(Z)V
  261. instance-of v1, p2, Lcom/google/gson/InstanceCreator;
  262. if-eqz v1, :cond_2
  263. iget-object v1, p0, Lcom/google/gson/GsonBuilder;->instanceCreators:Ljava/util/Map;
  264. move-object v2, p2
  265. check-cast v2, Lcom/google/gson/InstanceCreator;
  266. invoke-interface {v1, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  267. :cond_2
  268. if-nez v0, :cond_3
  269. instance-of v0, p2, Lcom/google/gson/JsonDeserializer;
  270. if-eqz v0, :cond_4
  271. :cond_3
  272. invoke-static {p1}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
  273. move-result-object v0
  274. iget-object v1, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  275. invoke-static {v0, p2}, Lcom/google/gson/internal/bind/TreeTypeAdapter;->newFactoryWithMatchRawType(Lcom/google/gson/reflect/TypeToken;Ljava/lang/Object;)Lcom/google/gson/TypeAdapterFactory;
  276. move-result-object v0
  277. invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  278. :cond_4
  279. instance-of v0, p2, Lcom/google/gson/TypeAdapter;
  280. if-eqz v0, :cond_5
  281. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  282. invoke-static {p1}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
  283. move-result-object p1
  284. check-cast p2, Lcom/google/gson/TypeAdapter;
  285. invoke-static {p1, p2}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Lcom/google/gson/reflect/TypeToken;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  286. move-result-object p1
  287. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  288. :cond_5
  289. return-object p0
  290. .end method
  291. .method public registerTypeAdapterFactory(Lcom/google/gson/TypeAdapterFactory;)Lcom/google/gson/GsonBuilder;
  292. .locals 1
  293. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  294. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  295. return-object p0
  296. .end method
  297. .method public registerTypeHierarchyAdapter(Ljava/lang/Class;Ljava/lang/Object;)Lcom/google/gson/GsonBuilder;
  298. .locals 2
  299. .annotation system Ldalvik/annotation/Signature;
  300. value = {
  301. "(",
  302. "Ljava/lang/Class<",
  303. "*>;",
  304. "Ljava/lang/Object;",
  305. ")",
  306. "Lcom/google/gson/GsonBuilder;"
  307. }
  308. .end annotation
  309. instance-of v0, p2, Lcom/google/gson/JsonSerializer;
  310. if-nez v0, :cond_1
  311. instance-of v1, p2, Lcom/google/gson/JsonDeserializer;
  312. if-nez v1, :cond_1
  313. instance-of v1, p2, Lcom/google/gson/TypeAdapter;
  314. if-eqz v1, :cond_0
  315. goto :goto_0
  316. :cond_0
  317. const/4 v1, 0x0
  318. goto :goto_1
  319. :cond_1
  320. :goto_0
  321. const/4 v1, 0x1
  322. :goto_1
  323. invoke-static {v1}, Lcom/google/gson/internal/$Gson$Preconditions;->checkArgument(Z)V
  324. instance-of v1, p2, Lcom/google/gson/JsonDeserializer;
  325. if-nez v1, :cond_2
  326. if-eqz v0, :cond_3
  327. :cond_2
  328. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->hierarchyFactories:Ljava/util/List;
  329. invoke-static {p1, p2}, Lcom/google/gson/internal/bind/TreeTypeAdapter;->newTypeHierarchyFactory(Ljava/lang/Class;Ljava/lang/Object;)Lcom/google/gson/TypeAdapterFactory;
  330. move-result-object v1
  331. invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  332. :cond_3
  333. instance-of v0, p2, Lcom/google/gson/TypeAdapter;
  334. if-eqz v0, :cond_4
  335. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->factories:Ljava/util/List;
  336. check-cast p2, Lcom/google/gson/TypeAdapter;
  337. invoke-static {p1, p2}, Lcom/google/gson/internal/bind/TypeAdapters;->newTypeHierarchyFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  338. move-result-object p1
  339. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  340. :cond_4
  341. return-object p0
  342. .end method
  343. .method public serializeNulls()Lcom/google/gson/GsonBuilder;
  344. .locals 1
  345. const/4 v0, 0x1
  346. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->serializeNulls:Z
  347. return-object p0
  348. .end method
  349. .method public serializeSpecialFloatingPointValues()Lcom/google/gson/GsonBuilder;
  350. .locals 1
  351. const/4 v0, 0x1
  352. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->serializeSpecialFloatingPointValues:Z
  353. return-object p0
  354. .end method
  355. .method public setDateFormat(I)Lcom/google/gson/GsonBuilder;
  356. .locals 0
  357. iput p1, p0, Lcom/google/gson/GsonBuilder;->dateStyle:I
  358. const/4 p1, 0x0
  359. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->datePattern:Ljava/lang/String;
  360. return-object p0
  361. .end method
  362. .method public setDateFormat(II)Lcom/google/gson/GsonBuilder;
  363. .locals 0
  364. iput p1, p0, Lcom/google/gson/GsonBuilder;->dateStyle:I
  365. iput p2, p0, Lcom/google/gson/GsonBuilder;->timeStyle:I
  366. const/4 p1, 0x0
  367. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->datePattern:Ljava/lang/String;
  368. return-object p0
  369. .end method
  370. .method public setDateFormat(Ljava/lang/String;)Lcom/google/gson/GsonBuilder;
  371. .locals 0
  372. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->datePattern:Ljava/lang/String;
  373. return-object p0
  374. .end method
  375. .method public varargs setExclusionStrategies([Lcom/google/gson/ExclusionStrategy;)Lcom/google/gson/GsonBuilder;
  376. .locals 5
  377. array-length v0, p1
  378. const/4 v1, 0x0
  379. :goto_0
  380. if-ge v1, v0, :cond_0
  381. aget-object v2, p1, v1
  382. iget-object v3, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  383. const/4 v4, 0x1
  384. invoke-virtual {v3, v2, v4, v4}, Lcom/google/gson/internal/Excluder;->withExclusionStrategy(Lcom/google/gson/ExclusionStrategy;ZZ)Lcom/google/gson/internal/Excluder;
  385. move-result-object v2
  386. iput-object v2, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  387. add-int/lit8 v1, v1, 0x1
  388. goto :goto_0
  389. :cond_0
  390. return-object p0
  391. .end method
  392. .method public setFieldNamingPolicy(Lcom/google/gson/FieldNamingPolicy;)Lcom/google/gson/GsonBuilder;
  393. .locals 0
  394. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->fieldNamingPolicy:Lcom/google/gson/FieldNamingStrategy;
  395. return-object p0
  396. .end method
  397. .method public setFieldNamingStrategy(Lcom/google/gson/FieldNamingStrategy;)Lcom/google/gson/GsonBuilder;
  398. .locals 0
  399. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->fieldNamingPolicy:Lcom/google/gson/FieldNamingStrategy;
  400. return-object p0
  401. .end method
  402. .method public setLenient()Lcom/google/gson/GsonBuilder;
  403. .locals 1
  404. const/4 v0, 0x1
  405. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->lenient:Z
  406. return-object p0
  407. .end method
  408. .method public setLongSerializationPolicy(Lcom/google/gson/LongSerializationPolicy;)Lcom/google/gson/GsonBuilder;
  409. .locals 0
  410. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->longSerializationPolicy:Lcom/google/gson/LongSerializationPolicy;
  411. return-object p0
  412. .end method
  413. .method public setPrettyPrinting()Lcom/google/gson/GsonBuilder;
  414. .locals 1
  415. const/4 v0, 0x1
  416. iput-boolean v0, p0, Lcom/google/gson/GsonBuilder;->prettyPrinting:Z
  417. return-object p0
  418. .end method
  419. .method public setVersion(D)Lcom/google/gson/GsonBuilder;
  420. .locals 1
  421. iget-object v0, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  422. invoke-virtual {v0, p1, p2}, Lcom/google/gson/internal/Excluder;->withVersion(D)Lcom/google/gson/internal/Excluder;
  423. move-result-object p1
  424. iput-object p1, p0, Lcom/google/gson/GsonBuilder;->excluder:Lcom/google/gson/internal/Excluder;
  425. return-object p0
  426. .end method