Gson.smali 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753
  1. .class public final Lcom/google/gson/Gson;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/MemberClasses;
  6. value = {
  7. Lcom/google/gson/Gson$FutureTypeAdapter;
  8. }
  9. .end annotation
  10. # static fields
  11. .field static final DEFAULT_COMPLEX_MAP_KEYS:Z = false
  12. .field static final DEFAULT_ESCAPE_HTML:Z = true
  13. .field static final DEFAULT_JSON_NON_EXECUTABLE:Z = false
  14. .field static final DEFAULT_LENIENT:Z = false
  15. .field static final DEFAULT_PRETTY_PRINT:Z = false
  16. .field static final DEFAULT_SERIALIZE_NULLS:Z = false
  17. .field static final DEFAULT_SPECIALIZE_FLOAT_VALUES:Z = false
  18. .field private static final JSON_NON_EXECUTABLE_PREFIX:Ljava/lang/String; = ")]}\'\n"
  19. .field private static final NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
  20. .annotation system Ldalvik/annotation/Signature;
  21. value = {
  22. "Lcom/google/gson/reflect/TypeToken<",
  23. "*>;"
  24. }
  25. .end annotation
  26. .end field
  27. # instance fields
  28. .field private final calls:Ljava/lang/ThreadLocal;
  29. .annotation system Ldalvik/annotation/Signature;
  30. value = {
  31. "Ljava/lang/ThreadLocal<",
  32. "Ljava/util/Map<",
  33. "Lcom/google/gson/reflect/TypeToken<",
  34. "*>;",
  35. "Lcom/google/gson/Gson$FutureTypeAdapter<",
  36. "*>;>;>;"
  37. }
  38. .end annotation
  39. .end field
  40. .field private final constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  41. .field private final excluder:Lcom/google/gson/internal/Excluder;
  42. .field private final factories:Ljava/util/List;
  43. .annotation system Ldalvik/annotation/Signature;
  44. value = {
  45. "Ljava/util/List<",
  46. "Lcom/google/gson/TypeAdapterFactory;",
  47. ">;"
  48. }
  49. .end annotation
  50. .end field
  51. .field private final fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
  52. .field private final generateNonExecutableJson:Z
  53. .field private final htmlSafe:Z
  54. .field private final jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  55. .field private final lenient:Z
  56. .field private final prettyPrinting:Z
  57. .field private final serializeNulls:Z
  58. .field private final typeTokenCache:Ljava/util/Map;
  59. .annotation system Ldalvik/annotation/Signature;
  60. value = {
  61. "Ljava/util/Map<",
  62. "Lcom/google/gson/reflect/TypeToken<",
  63. "*>;",
  64. "Lcom/google/gson/TypeAdapter<",
  65. "*>;>;"
  66. }
  67. .end annotation
  68. .end field
  69. # direct methods
  70. .method static constructor <clinit>()V
  71. .locals 1
  72. const-class v0, Ljava/lang/Object;
  73. invoke-static {v0}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/Class;)Lcom/google/gson/reflect/TypeToken;
  74. move-result-object v0
  75. sput-object v0, Lcom/google/gson/Gson;->NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
  76. return-void
  77. .end method
  78. .method public constructor <init>()V
  79. .locals 13
  80. sget-object v1, Lcom/google/gson/internal/Excluder;->DEFAULT:Lcom/google/gson/internal/Excluder;
  81. sget-object v2, Lcom/google/gson/FieldNamingPolicy;->IDENTITY:Lcom/google/gson/FieldNamingPolicy;
  82. invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;
  83. move-result-object v3
  84. sget-object v11, Lcom/google/gson/LongSerializationPolicy;->DEFAULT:Lcom/google/gson/LongSerializationPolicy;
  85. invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
  86. move-result-object v12
  87. const/4 v4, 0x0
  88. const/4 v5, 0x0
  89. const/4 v6, 0x0
  90. const/4 v7, 0x1
  91. const/4 v8, 0x0
  92. const/4 v9, 0x0
  93. const/4 v10, 0x0
  94. move-object v0, p0
  95. 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
  96. return-void
  97. .end method
  98. .method constructor <init>(Lcom/google/gson/internal/Excluder;Lcom/google/gson/FieldNamingStrategy;Ljava/util/Map;ZZZZZZZLcom/google/gson/LongSerializationPolicy;Ljava/util/List;)V
  99. .locals 1
  100. .annotation system Ldalvik/annotation/Signature;
  101. value = {
  102. "(",
  103. "Lcom/google/gson/internal/Excluder;",
  104. "Lcom/google/gson/FieldNamingStrategy;",
  105. "Ljava/util/Map<",
  106. "Ljava/lang/reflect/Type;",
  107. "Lcom/google/gson/InstanceCreator<",
  108. "*>;>;ZZZZZZZ",
  109. "Lcom/google/gson/LongSerializationPolicy;",
  110. "Ljava/util/List<",
  111. "Lcom/google/gson/TypeAdapterFactory;",
  112. ">;)V"
  113. }
  114. .end annotation
  115. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  116. new-instance v0, Ljava/lang/ThreadLocal;
  117. invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V
  118. iput-object v0, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
  119. new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
  120. invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
  121. iput-object v0, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
  122. new-instance v0, Lcom/google/gson/internal/ConstructorConstructor;
  123. invoke-direct {v0, p3}, Lcom/google/gson/internal/ConstructorConstructor;-><init>(Ljava/util/Map;)V
  124. iput-object v0, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  125. iput-object p1, p0, Lcom/google/gson/Gson;->excluder:Lcom/google/gson/internal/Excluder;
  126. iput-object p2, p0, Lcom/google/gson/Gson;->fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
  127. iput-boolean p4, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  128. iput-boolean p6, p0, Lcom/google/gson/Gson;->generateNonExecutableJson:Z
  129. iput-boolean p7, p0, Lcom/google/gson/Gson;->htmlSafe:Z
  130. iput-boolean p8, p0, Lcom/google/gson/Gson;->prettyPrinting:Z
  131. iput-boolean p9, p0, Lcom/google/gson/Gson;->lenient:Z
  132. new-instance p3, Ljava/util/ArrayList;
  133. invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V
  134. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->JSON_ELEMENT_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  135. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  136. sget-object p4, Lcom/google/gson/internal/bind/ObjectTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
  137. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  138. invoke-interface {p3, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  139. invoke-interface {p3, p12}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
  140. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  141. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  142. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->INTEGER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  143. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  144. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BOOLEAN_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  145. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  146. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BYTE_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  147. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  148. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->SHORT_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  149. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  150. invoke-static {p11}, Lcom/google/gson/Gson;->longAdapter(Lcom/google/gson/LongSerializationPolicy;)Lcom/google/gson/TypeAdapter;
  151. move-result-object p4
  152. sget-object p6, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
  153. const-class p7, Ljava/lang/Long;
  154. invoke-static {p6, p7, p4}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  155. move-result-object p6
  156. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  157. sget-object p6, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
  158. const-class p7, Ljava/lang/Double;
  159. invoke-direct {p0, p10}, Lcom/google/gson/Gson;->doubleAdapter(Z)Lcom/google/gson/TypeAdapter;
  160. move-result-object p8
  161. invoke-static {p6, p7, p8}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  162. move-result-object p6
  163. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  164. sget-object p6, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
  165. const-class p7, Ljava/lang/Float;
  166. invoke-direct {p0, p10}, Lcom/google/gson/Gson;->floatAdapter(Z)Lcom/google/gson/TypeAdapter;
  167. move-result-object p8
  168. invoke-static {p6, p7, p8}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  169. move-result-object p6
  170. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  171. sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->NUMBER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  172. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  173. sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_INTEGER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  174. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  175. sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_BOOLEAN_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  176. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  177. const-class p6, Ljava/util/concurrent/atomic/AtomicLong;
  178. invoke-static {p4}, Lcom/google/gson/Gson;->atomicLongAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
  179. move-result-object p7
  180. invoke-static {p6, p7}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  181. move-result-object p6
  182. invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  183. const-class p6, Ljava/util/concurrent/atomic/AtomicLongArray;
  184. invoke-static {p4}, Lcom/google/gson/Gson;->atomicLongArrayAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
  185. move-result-object p4
  186. invoke-static {p6, p4}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  187. move-result-object p4
  188. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  189. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_INTEGER_ARRAY_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  190. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  191. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CHARACTER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  192. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  193. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_BUILDER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  194. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  195. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_BUFFER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  196. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  197. const-class p4, Ljava/math/BigDecimal;
  198. sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->BIG_DECIMAL:Lcom/google/gson/TypeAdapter;
  199. invoke-static {p4, p6}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  200. move-result-object p4
  201. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  202. const-class p4, Ljava/math/BigInteger;
  203. sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->BIG_INTEGER:Lcom/google/gson/TypeAdapter;
  204. invoke-static {p4, p6}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
  205. move-result-object p4
  206. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  207. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->URL_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  208. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  209. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->URI_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  210. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  211. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->UUID_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  212. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  213. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CURRENCY_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  214. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  215. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->LOCALE_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  216. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  217. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->INET_ADDRESS_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  218. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  219. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BIT_SET_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  220. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  221. sget-object p4, Lcom/google/gson/internal/bind/DateTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
  222. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  223. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CALENDAR_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  224. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  225. sget-object p4, Lcom/google/gson/internal/bind/TimeTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
  226. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  227. sget-object p4, Lcom/google/gson/internal/bind/SqlDateTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
  228. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  229. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->TIMESTAMP_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  230. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  231. sget-object p4, Lcom/google/gson/internal/bind/ArrayTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
  232. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  233. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CLASS_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  234. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  235. new-instance p4, Lcom/google/gson/internal/bind/CollectionTypeAdapterFactory;
  236. iget-object p6, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  237. invoke-direct {p4, p6}, Lcom/google/gson/internal/bind/CollectionTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;)V
  238. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  239. new-instance p4, Lcom/google/gson/internal/bind/MapTypeAdapterFactory;
  240. iget-object p6, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  241. invoke-direct {p4, p6, p5}, Lcom/google/gson/internal/bind/MapTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;Z)V
  242. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  243. new-instance p4, Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  244. iget-object p5, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  245. invoke-direct {p4, p5}, Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;)V
  246. iput-object p4, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  247. iget-object p4, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  248. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  249. sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->ENUM_FACTORY:Lcom/google/gson/TypeAdapterFactory;
  250. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  251. new-instance p4, Lcom/google/gson/internal/bind/ReflectiveTypeAdapterFactory;
  252. iget-object p5, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  253. iget-object p6, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  254. invoke-direct {p4, p5, p2, p1, p6}, Lcom/google/gson/internal/bind/ReflectiveTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;Lcom/google/gson/FieldNamingStrategy;Lcom/google/gson/internal/Excluder;Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;)V
  255. invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  256. invoke-static {p3}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
  257. move-result-object p1
  258. iput-object p1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
  259. return-void
  260. .end method
  261. .method private static assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
  262. .locals 0
  263. if-eqz p0, :cond_1
  264. :try_start_0
  265. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
  266. move-result-object p0
  267. sget-object p1, Lcom/google/gson/stream/JsonToken;->END_DOCUMENT:Lcom/google/gson/stream/JsonToken;
  268. if-ne p0, p1, :cond_0
  269. goto :goto_0
  270. :cond_0
  271. new-instance p0, Lcom/google/gson/JsonIOException;
  272. const-string p1, "JSON document was not fully consumed."
  273. invoke-direct {p0, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/String;)V
  274. throw p0
  275. :try_end_0
  276. .catch Lcom/google/gson/stream/MalformedJsonException; {:try_start_0 .. :try_end_0} :catch_1
  277. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  278. :catch_0
  279. move-exception p0
  280. new-instance p1, Lcom/google/gson/JsonIOException;
  281. invoke-direct {p1, p0}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
  282. throw p1
  283. :catch_1
  284. move-exception p0
  285. new-instance p1, Lcom/google/gson/JsonSyntaxException;
  286. invoke-direct {p1, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
  287. throw p1
  288. :cond_1
  289. :goto_0
  290. return-void
  291. .end method
  292. .method private static atomicLongAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
  293. .locals 1
  294. .annotation system Ldalvik/annotation/Signature;
  295. value = {
  296. "(",
  297. "Lcom/google/gson/TypeAdapter<",
  298. "Ljava/lang/Number;",
  299. ">;)",
  300. "Lcom/google/gson/TypeAdapter<",
  301. "Ljava/util/concurrent/atomic/AtomicLong;",
  302. ">;"
  303. }
  304. .end annotation
  305. new-instance v0, Lcom/google/gson/Gson$4;
  306. invoke-direct {v0, p0}, Lcom/google/gson/Gson$4;-><init>(Lcom/google/gson/TypeAdapter;)V
  307. invoke-virtual {v0}, Lcom/google/gson/TypeAdapter;->nullSafe()Lcom/google/gson/TypeAdapter;
  308. move-result-object p0
  309. return-object p0
  310. .end method
  311. .method private static atomicLongArrayAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
  312. .locals 1
  313. .annotation system Ldalvik/annotation/Signature;
  314. value = {
  315. "(",
  316. "Lcom/google/gson/TypeAdapter<",
  317. "Ljava/lang/Number;",
  318. ">;)",
  319. "Lcom/google/gson/TypeAdapter<",
  320. "Ljava/util/concurrent/atomic/AtomicLongArray;",
  321. ">;"
  322. }
  323. .end annotation
  324. new-instance v0, Lcom/google/gson/Gson$5;
  325. invoke-direct {v0, p0}, Lcom/google/gson/Gson$5;-><init>(Lcom/google/gson/TypeAdapter;)V
  326. invoke-virtual {v0}, Lcom/google/gson/TypeAdapter;->nullSafe()Lcom/google/gson/TypeAdapter;
  327. move-result-object p0
  328. return-object p0
  329. .end method
  330. .method static checkValidFloatingPoint(D)V
  331. .locals 2
  332. invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z
  333. move-result v0
  334. if-nez v0, :cond_0
  335. invoke-static {p0, p1}, Ljava/lang/Double;->isInfinite(D)Z
  336. move-result v0
  337. if-nez v0, :cond_0
  338. return-void
  339. :cond_0
  340. new-instance v0, Ljava/lang/IllegalArgumentException;
  341. new-instance v1, Ljava/lang/StringBuilder;
  342. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  343. invoke-virtual {v1, p0, p1}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;
  344. const-string p0, " is not a valid double value as per JSON specification. To override this"
  345. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  346. const-string p0, " behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method."
  347. invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  348. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  349. move-result-object p0
  350. invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  351. throw v0
  352. .end method
  353. .method private doubleAdapter(Z)Lcom/google/gson/TypeAdapter;
  354. .locals 0
  355. .annotation system Ldalvik/annotation/Signature;
  356. value = {
  357. "(Z)",
  358. "Lcom/google/gson/TypeAdapter<",
  359. "Ljava/lang/Number;",
  360. ">;"
  361. }
  362. .end annotation
  363. if-eqz p1, :cond_0
  364. sget-object p1, Lcom/google/gson/internal/bind/TypeAdapters;->DOUBLE:Lcom/google/gson/TypeAdapter;
  365. return-object p1
  366. :cond_0
  367. new-instance p1, Lcom/google/gson/Gson$1;
  368. invoke-direct {p1, p0}, Lcom/google/gson/Gson$1;-><init>(Lcom/google/gson/Gson;)V
  369. return-object p1
  370. .end method
  371. .method private floatAdapter(Z)Lcom/google/gson/TypeAdapter;
  372. .locals 0
  373. .annotation system Ldalvik/annotation/Signature;
  374. value = {
  375. "(Z)",
  376. "Lcom/google/gson/TypeAdapter<",
  377. "Ljava/lang/Number;",
  378. ">;"
  379. }
  380. .end annotation
  381. if-eqz p1, :cond_0
  382. sget-object p1, Lcom/google/gson/internal/bind/TypeAdapters;->FLOAT:Lcom/google/gson/TypeAdapter;
  383. return-object p1
  384. :cond_0
  385. new-instance p1, Lcom/google/gson/Gson$2;
  386. invoke-direct {p1, p0}, Lcom/google/gson/Gson$2;-><init>(Lcom/google/gson/Gson;)V
  387. return-object p1
  388. .end method
  389. .method private static longAdapter(Lcom/google/gson/LongSerializationPolicy;)Lcom/google/gson/TypeAdapter;
  390. .locals 1
  391. .annotation system Ldalvik/annotation/Signature;
  392. value = {
  393. "(",
  394. "Lcom/google/gson/LongSerializationPolicy;",
  395. ")",
  396. "Lcom/google/gson/TypeAdapter<",
  397. "Ljava/lang/Number;",
  398. ">;"
  399. }
  400. .end annotation
  401. sget-object v0, Lcom/google/gson/LongSerializationPolicy;->DEFAULT:Lcom/google/gson/LongSerializationPolicy;
  402. if-ne p0, v0, :cond_0
  403. sget-object p0, Lcom/google/gson/internal/bind/TypeAdapters;->LONG:Lcom/google/gson/TypeAdapter;
  404. return-object p0
  405. :cond_0
  406. new-instance p0, Lcom/google/gson/Gson$3;
  407. invoke-direct {p0}, Lcom/google/gson/Gson$3;-><init>()V
  408. return-object p0
  409. .end method
  410. # virtual methods
  411. .method public excluder()Lcom/google/gson/internal/Excluder;
  412. .locals 1
  413. iget-object v0, p0, Lcom/google/gson/Gson;->excluder:Lcom/google/gson/internal/Excluder;
  414. return-object v0
  415. .end method
  416. .method public fieldNamingStrategy()Lcom/google/gson/FieldNamingStrategy;
  417. .locals 1
  418. iget-object v0, p0, Lcom/google/gson/Gson;->fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
  419. return-object v0
  420. .end method
  421. .method public fromJson(Lcom/google/gson/JsonElement;Ljava/lang/Class;)Ljava/lang/Object;
  422. .locals 0
  423. .annotation system Ldalvik/annotation/Signature;
  424. value = {
  425. "<T:",
  426. "Ljava/lang/Object;",
  427. ">(",
  428. "Lcom/google/gson/JsonElement;",
  429. "Ljava/lang/Class<",
  430. "TT;>;)TT;"
  431. }
  432. .end annotation
  433. .annotation system Ldalvik/annotation/Throws;
  434. value = {
  435. Lcom/google/gson/JsonSyntaxException;
  436. }
  437. .end annotation
  438. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  439. move-result-object p1
  440. invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
  441. move-result-object p2
  442. invoke-virtual {p2, p1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
  443. move-result-object p1
  444. return-object p1
  445. .end method
  446. .method public fromJson(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  447. .locals 1
  448. .annotation system Ldalvik/annotation/Signature;
  449. value = {
  450. "<T:",
  451. "Ljava/lang/Object;",
  452. ">(",
  453. "Lcom/google/gson/JsonElement;",
  454. "Ljava/lang/reflect/Type;",
  455. ")TT;"
  456. }
  457. .end annotation
  458. .annotation system Ldalvik/annotation/Throws;
  459. value = {
  460. Lcom/google/gson/JsonSyntaxException;
  461. }
  462. .end annotation
  463. if-nez p1, :cond_0
  464. const/4 p1, 0x0
  465. return-object p1
  466. :cond_0
  467. new-instance v0, Lcom/google/gson/internal/bind/JsonTreeReader;
  468. invoke-direct {v0, p1}, Lcom/google/gson/internal/bind/JsonTreeReader;-><init>(Lcom/google/gson/JsonElement;)V
  469. invoke-virtual {p0, v0, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  470. move-result-object p1
  471. return-object p1
  472. .end method
  473. .method public fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  474. .locals 2
  475. .annotation system Ldalvik/annotation/Signature;
  476. value = {
  477. "<T:",
  478. "Ljava/lang/Object;",
  479. ">(",
  480. "Lcom/google/gson/stream/JsonReader;",
  481. "Ljava/lang/reflect/Type;",
  482. ")TT;"
  483. }
  484. .end annotation
  485. .annotation system Ldalvik/annotation/Throws;
  486. value = {
  487. Lcom/google/gson/JsonIOException;,
  488. Lcom/google/gson/JsonSyntaxException;
  489. }
  490. .end annotation
  491. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->isLenient()Z
  492. move-result v0
  493. const/4 v1, 0x1
  494. invoke-virtual {p1, v1}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
  495. :try_start_0
  496. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
  497. const/4 v1, 0x0
  498. invoke-static {p2}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
  499. move-result-object p2
  500. invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  501. move-result-object p2
  502. invoke-virtual {p2, p1}, Lcom/google/gson/TypeAdapter;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
  503. move-result-object p2
  504. :try_end_0
  505. .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_2
  506. .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_1
  507. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  508. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  509. invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
  510. return-object p2
  511. :catchall_0
  512. move-exception p2
  513. goto :goto_0
  514. :catch_0
  515. move-exception p2
  516. :try_start_1
  517. new-instance v1, Lcom/google/gson/JsonSyntaxException;
  518. invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
  519. throw v1
  520. :catch_1
  521. move-exception p2
  522. new-instance v1, Lcom/google/gson/JsonSyntaxException;
  523. invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
  524. throw v1
  525. :try_end_1
  526. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  527. :catch_2
  528. move-exception p2
  529. if-eqz v1, :cond_0
  530. const/4 p2, 0x0
  531. invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
  532. return-object p2
  533. :cond_0
  534. :try_start_2
  535. new-instance v1, Lcom/google/gson/JsonSyntaxException;
  536. invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
  537. throw v1
  538. :try_end_2
  539. .catchall {:try_start_2 .. :try_end_2} :catchall_0
  540. :goto_0
  541. invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
  542. throw p2
  543. .end method
  544. .method public fromJson(Ljava/io/Reader;Ljava/lang/Class;)Ljava/lang/Object;
  545. .locals 1
  546. .annotation system Ldalvik/annotation/Signature;
  547. value = {
  548. "<T:",
  549. "Ljava/lang/Object;",
  550. ">(",
  551. "Ljava/io/Reader;",
  552. "Ljava/lang/Class<",
  553. "TT;>;)TT;"
  554. }
  555. .end annotation
  556. .annotation system Ldalvik/annotation/Throws;
  557. value = {
  558. Lcom/google/gson/JsonSyntaxException;,
  559. Lcom/google/gson/JsonIOException;
  560. }
  561. .end annotation
  562. invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
  563. move-result-object p1
  564. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  565. move-result-object v0
  566. invoke-static {v0, p1}, Lcom/google/gson/Gson;->assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
  567. invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
  568. move-result-object p1
  569. invoke-virtual {p1, v0}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
  570. move-result-object p1
  571. return-object p1
  572. .end method
  573. .method public fromJson(Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  574. .locals 0
  575. .annotation system Ldalvik/annotation/Signature;
  576. value = {
  577. "<T:",
  578. "Ljava/lang/Object;",
  579. ">(",
  580. "Ljava/io/Reader;",
  581. "Ljava/lang/reflect/Type;",
  582. ")TT;"
  583. }
  584. .end annotation
  585. .annotation system Ldalvik/annotation/Throws;
  586. value = {
  587. Lcom/google/gson/JsonIOException;,
  588. Lcom/google/gson/JsonSyntaxException;
  589. }
  590. .end annotation
  591. invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
  592. move-result-object p1
  593. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  594. move-result-object p2
  595. invoke-static {p2, p1}, Lcom/google/gson/Gson;->assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
  596. return-object p2
  597. .end method
  598. .method public fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
  599. .locals 0
  600. .annotation system Ldalvik/annotation/Signature;
  601. value = {
  602. "<T:",
  603. "Ljava/lang/Object;",
  604. ">(",
  605. "Ljava/lang/String;",
  606. "Ljava/lang/Class<",
  607. "TT;>;)TT;"
  608. }
  609. .end annotation
  610. .annotation system Ldalvik/annotation/Throws;
  611. value = {
  612. Lcom/google/gson/JsonSyntaxException;
  613. }
  614. .end annotation
  615. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  616. move-result-object p1
  617. invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
  618. move-result-object p2
  619. invoke-virtual {p2, p1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
  620. move-result-object p1
  621. return-object p1
  622. .end method
  623. .method public fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  624. .locals 1
  625. .annotation system Ldalvik/annotation/Signature;
  626. value = {
  627. "<T:",
  628. "Ljava/lang/Object;",
  629. ">(",
  630. "Ljava/lang/String;",
  631. "Ljava/lang/reflect/Type;",
  632. ")TT;"
  633. }
  634. .end annotation
  635. .annotation system Ldalvik/annotation/Throws;
  636. value = {
  637. Lcom/google/gson/JsonSyntaxException;
  638. }
  639. .end annotation
  640. if-nez p1, :cond_0
  641. const/4 p1, 0x0
  642. return-object p1
  643. :cond_0
  644. new-instance v0, Ljava/io/StringReader;
  645. invoke-direct {v0, p1}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V
  646. invoke-virtual {p0, v0, p2}, Lcom/google/gson/Gson;->fromJson(Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
  647. move-result-object p1
  648. return-object p1
  649. .end method
  650. .method public getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  651. .locals 5
  652. .annotation system Ldalvik/annotation/Signature;
  653. value = {
  654. "<T:",
  655. "Ljava/lang/Object;",
  656. ">(",
  657. "Lcom/google/gson/reflect/TypeToken<",
  658. "TT;>;)",
  659. "Lcom/google/gson/TypeAdapter<",
  660. "TT;>;"
  661. }
  662. .end annotation
  663. iget-object v0, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
  664. if-nez p1, :cond_0
  665. sget-object v1, Lcom/google/gson/Gson;->NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
  666. goto :goto_0
  667. :cond_0
  668. move-object v1, p1
  669. :goto_0
  670. invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
  671. move-result-object v0
  672. check-cast v0, Lcom/google/gson/TypeAdapter;
  673. if-eqz v0, :cond_1
  674. return-object v0
  675. :cond_1
  676. iget-object v0, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
  677. invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
  678. move-result-object v0
  679. check-cast v0, Ljava/util/Map;
  680. const/4 v1, 0x0
  681. if-nez v0, :cond_2
  682. new-instance v0, Ljava/util/HashMap;
  683. invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
  684. iget-object v1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
  685. invoke-virtual {v1, v0}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V
  686. const/4 v1, 0x1
  687. :cond_2
  688. invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
  689. move-result-object v2
  690. check-cast v2, Lcom/google/gson/Gson$FutureTypeAdapter;
  691. if-eqz v2, :cond_3
  692. return-object v2
  693. :cond_3
  694. :try_start_0
  695. new-instance v2, Lcom/google/gson/Gson$FutureTypeAdapter;
  696. invoke-direct {v2}, Lcom/google/gson/Gson$FutureTypeAdapter;-><init>()V
  697. invoke-interface {v0, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  698. iget-object v3, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
  699. invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
  700. move-result-object v3
  701. :cond_4
  702. invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
  703. move-result v4
  704. if-eqz v4, :cond_6
  705. invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
  706. move-result-object v4
  707. check-cast v4, Lcom/google/gson/TypeAdapterFactory;
  708. invoke-interface {v4, p0, p1}, Lcom/google/gson/TypeAdapterFactory;->create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  709. move-result-object v4
  710. if-eqz v4, :cond_4
  711. invoke-virtual {v2, v4}, Lcom/google/gson/Gson$FutureTypeAdapter;->setDelegate(Lcom/google/gson/TypeAdapter;)V
  712. iget-object v2, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
  713. invoke-interface {v2, p1, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
  714. :try_end_0
  715. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  716. invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
  717. if-eqz v1, :cond_5
  718. iget-object p1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
  719. invoke-virtual {p1}, Ljava/lang/ThreadLocal;->remove()V
  720. :cond_5
  721. return-object v4
  722. :cond_6
  723. :try_start_1
  724. new-instance v2, Ljava/lang/IllegalArgumentException;
  725. new-instance v3, Ljava/lang/StringBuilder;
  726. invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
  727. const-string v4, "GSON cannot handle "
  728. invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  729. invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  730. invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  731. move-result-object v3
  732. invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  733. throw v2
  734. :try_end_1
  735. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  736. :catchall_0
  737. move-exception v2
  738. invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
  739. if-eqz v1, :cond_7
  740. iget-object p1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
  741. invoke-virtual {p1}, Ljava/lang/ThreadLocal;->remove()V
  742. :cond_7
  743. goto :goto_2
  744. :goto_1
  745. throw v2
  746. :goto_2
  747. goto :goto_1
  748. .end method
  749. .method public getAdapter(Ljava/lang/Class;)Lcom/google/gson/TypeAdapter;
  750. .locals 0
  751. .annotation system Ldalvik/annotation/Signature;
  752. value = {
  753. "<T:",
  754. "Ljava/lang/Object;",
  755. ">(",
  756. "Ljava/lang/Class<",
  757. "TT;>;)",
  758. "Lcom/google/gson/TypeAdapter<",
  759. "TT;>;"
  760. }
  761. .end annotation
  762. invoke-static {p1}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/Class;)Lcom/google/gson/reflect/TypeToken;
  763. move-result-object p1
  764. invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  765. move-result-object p1
  766. return-object p1
  767. .end method
  768. .method public getDelegateAdapter(Lcom/google/gson/TypeAdapterFactory;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  769. .locals 3
  770. .annotation system Ldalvik/annotation/Signature;
  771. value = {
  772. "<T:",
  773. "Ljava/lang/Object;",
  774. ">(",
  775. "Lcom/google/gson/TypeAdapterFactory;",
  776. "Lcom/google/gson/reflect/TypeToken<",
  777. "TT;>;)",
  778. "Lcom/google/gson/TypeAdapter<",
  779. "TT;>;"
  780. }
  781. .end annotation
  782. iget-object v0, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
  783. invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
  784. move-result v0
  785. if-nez v0, :cond_0
  786. iget-object p1, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
  787. :cond_0
  788. const/4 v0, 0x0
  789. iget-object v1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
  790. invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
  791. move-result-object v1
  792. :cond_1
  793. :goto_0
  794. invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
  795. move-result v2
  796. if-eqz v2, :cond_3
  797. invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
  798. move-result-object v2
  799. check-cast v2, Lcom/google/gson/TypeAdapterFactory;
  800. if-nez v0, :cond_2
  801. if-ne v2, p1, :cond_1
  802. const/4 v0, 0x1
  803. goto :goto_0
  804. :cond_2
  805. invoke-interface {v2, p0, p2}, Lcom/google/gson/TypeAdapterFactory;->create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  806. move-result-object v2
  807. if-eqz v2, :cond_1
  808. return-object v2
  809. :cond_3
  810. new-instance p1, Ljava/lang/IllegalArgumentException;
  811. new-instance v0, Ljava/lang/StringBuilder;
  812. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  813. const-string v1, "GSON cannot serialize "
  814. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  815. invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  816. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  817. move-result-object p2
  818. invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
  819. goto :goto_2
  820. :goto_1
  821. throw p1
  822. :goto_2
  823. goto :goto_1
  824. .end method
  825. .method public htmlSafe()Z
  826. .locals 1
  827. iget-boolean v0, p0, Lcom/google/gson/Gson;->htmlSafe:Z
  828. return v0
  829. .end method
  830. .method public newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
  831. .locals 1
  832. new-instance v0, Lcom/google/gson/stream/JsonReader;
  833. invoke-direct {v0, p1}, Lcom/google/gson/stream/JsonReader;-><init>(Ljava/io/Reader;)V
  834. iget-boolean p1, p0, Lcom/google/gson/Gson;->lenient:Z
  835. invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
  836. return-object v0
  837. .end method
  838. .method public newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
  839. .locals 1
  840. .annotation system Ldalvik/annotation/Throws;
  841. value = {
  842. Ljava/io/IOException;
  843. }
  844. .end annotation
  845. iget-boolean v0, p0, Lcom/google/gson/Gson;->generateNonExecutableJson:Z
  846. if-eqz v0, :cond_0
  847. const-string v0, ")]}\'\n"
  848. invoke-virtual {p1, v0}, Ljava/io/Writer;->write(Ljava/lang/String;)V
  849. :cond_0
  850. new-instance v0, Lcom/google/gson/stream/JsonWriter;
  851. invoke-direct {v0, p1}, Lcom/google/gson/stream/JsonWriter;-><init>(Ljava/io/Writer;)V
  852. iget-boolean p1, p0, Lcom/google/gson/Gson;->prettyPrinting:Z
  853. if-eqz p1, :cond_1
  854. const-string p1, " "
  855. invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonWriter;->setIndent(Ljava/lang/String;)V
  856. :cond_1
  857. iget-boolean p1, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  858. invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  859. return-object v0
  860. .end method
  861. .method public serializeNulls()Z
  862. .locals 1
  863. iget-boolean v0, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  864. return v0
  865. .end method
  866. .method public toJson(Lcom/google/gson/JsonElement;)Ljava/lang/String;
  867. .locals 1
  868. new-instance v0, Ljava/io/StringWriter;
  869. invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
  870. invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
  871. invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
  872. move-result-object p1
  873. return-object p1
  874. .end method
  875. .method public toJson(Ljava/lang/Object;)Ljava/lang/String;
  876. .locals 1
  877. if-nez p1, :cond_0
  878. sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
  879. invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;)Ljava/lang/String;
  880. move-result-object p1
  881. return-object p1
  882. :cond_0
  883. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  884. move-result-object v0
  885. invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;)Ljava/lang/String;
  886. move-result-object p1
  887. return-object p1
  888. .end method
  889. .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;)Ljava/lang/String;
  890. .locals 1
  891. new-instance v0, Ljava/io/StringWriter;
  892. invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
  893. invoke-virtual {p0, p1, p2, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
  894. invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
  895. move-result-object p1
  896. return-object p1
  897. .end method
  898. .method public toJson(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
  899. .locals 4
  900. .annotation system Ldalvik/annotation/Throws;
  901. value = {
  902. Lcom/google/gson/JsonIOException;
  903. }
  904. .end annotation
  905. invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
  906. move-result v0
  907. const/4 v1, 0x1
  908. invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  909. invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->isHtmlSafe()Z
  910. move-result v1
  911. iget-boolean v2, p0, Lcom/google/gson/Gson;->htmlSafe:Z
  912. invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  913. invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->getSerializeNulls()Z
  914. move-result v2
  915. iget-boolean v3, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  916. invoke-virtual {p2, v3}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  917. :try_start_0
  918. invoke-static {p1, p2}, Lcom/google/gson/internal/Streams;->write(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
  919. :try_end_0
  920. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  921. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  922. invoke-virtual {p2, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  923. invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  924. invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  925. return-void
  926. :catchall_0
  927. move-exception p1
  928. goto :goto_0
  929. :catch_0
  930. move-exception p1
  931. :try_start_1
  932. new-instance v3, Lcom/google/gson/JsonIOException;
  933. invoke-direct {v3, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
  934. throw v3
  935. :try_end_1
  936. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  937. :goto_0
  938. invoke-virtual {p2, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  939. invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  940. invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  941. throw p1
  942. .end method
  943. .method public toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
  944. .locals 0
  945. .annotation system Ldalvik/annotation/Throws;
  946. value = {
  947. Lcom/google/gson/JsonIOException;
  948. }
  949. .end annotation
  950. :try_start_0
  951. invoke-static {p2}, Lcom/google/gson/internal/Streams;->writerForAppendable(Ljava/lang/Appendable;)Ljava/io/Writer;
  952. move-result-object p2
  953. invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
  954. move-result-object p2
  955. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
  956. :try_end_0
  957. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  958. return-void
  959. :catch_0
  960. move-exception p1
  961. new-instance p2, Lcom/google/gson/JsonIOException;
  962. invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
  963. throw p2
  964. .end method
  965. .method public toJson(Ljava/lang/Object;Ljava/lang/Appendable;)V
  966. .locals 1
  967. .annotation system Ldalvik/annotation/Throws;
  968. value = {
  969. Lcom/google/gson/JsonIOException;
  970. }
  971. .end annotation
  972. if-eqz p1, :cond_0
  973. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  974. move-result-object v0
  975. invoke-virtual {p0, p1, v0, p2}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
  976. goto :goto_0
  977. :cond_0
  978. sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
  979. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
  980. :goto_0
  981. return-void
  982. .end method
  983. .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
  984. .locals 4
  985. .annotation system Ldalvik/annotation/Throws;
  986. value = {
  987. Lcom/google/gson/JsonIOException;
  988. }
  989. .end annotation
  990. invoke-static {p2}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
  991. move-result-object p2
  992. invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  993. move-result-object p2
  994. invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
  995. move-result v0
  996. const/4 v1, 0x1
  997. invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  998. invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->isHtmlSafe()Z
  999. move-result v1
  1000. iget-boolean v2, p0, Lcom/google/gson/Gson;->htmlSafe:Z
  1001. invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  1002. invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->getSerializeNulls()Z
  1003. move-result v2
  1004. iget-boolean v3, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  1005. invoke-virtual {p3, v3}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  1006. :try_start_0
  1007. invoke-virtual {p2, p3, p1}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
  1008. :try_end_0
  1009. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  1010. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  1011. invoke-virtual {p3, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  1012. invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  1013. invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  1014. return-void
  1015. :catchall_0
  1016. move-exception p1
  1017. goto :goto_0
  1018. :catch_0
  1019. move-exception p1
  1020. :try_start_1
  1021. new-instance p2, Lcom/google/gson/JsonIOException;
  1022. invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
  1023. throw p2
  1024. :try_end_1
  1025. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  1026. :goto_0
  1027. invoke-virtual {p3, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
  1028. invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
  1029. invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
  1030. throw p1
  1031. .end method
  1032. .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
  1033. .locals 0
  1034. .annotation system Ldalvik/annotation/Throws;
  1035. value = {
  1036. Lcom/google/gson/JsonIOException;
  1037. }
  1038. .end annotation
  1039. :try_start_0
  1040. invoke-static {p3}, Lcom/google/gson/internal/Streams;->writerForAppendable(Ljava/lang/Appendable;)Ljava/io/Writer;
  1041. move-result-object p3
  1042. invoke-virtual {p0, p3}, Lcom/google/gson/Gson;->newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
  1043. move-result-object p3
  1044. invoke-virtual {p0, p1, p2, p3}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
  1045. :try_end_0
  1046. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  1047. return-void
  1048. :catch_0
  1049. move-exception p1
  1050. new-instance p2, Lcom/google/gson/JsonIOException;
  1051. invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
  1052. throw p2
  1053. .end method
  1054. .method public toJsonTree(Ljava/lang/Object;)Lcom/google/gson/JsonElement;
  1055. .locals 1
  1056. if-nez p1, :cond_0
  1057. sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
  1058. return-object p1
  1059. :cond_0
  1060. invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
  1061. move-result-object v0
  1062. invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJsonTree(Ljava/lang/Object;Ljava/lang/reflect/Type;)Lcom/google/gson/JsonElement;
  1063. move-result-object p1
  1064. return-object p1
  1065. .end method
  1066. .method public toJsonTree(Ljava/lang/Object;Ljava/lang/reflect/Type;)Lcom/google/gson/JsonElement;
  1067. .locals 1
  1068. new-instance v0, Lcom/google/gson/internal/bind/JsonTreeWriter;
  1069. invoke-direct {v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;-><init>()V
  1070. invoke-virtual {p0, p1, p2, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
  1071. invoke-virtual {v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->get()Lcom/google/gson/JsonElement;
  1072. move-result-object p1
  1073. return-object p1
  1074. .end method
  1075. .method public toString()Ljava/lang/String;
  1076. .locals 2
  1077. new-instance v0, Ljava/lang/StringBuilder;
  1078. const-string v1, "{serializeNulls:"
  1079. invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
  1080. iget-boolean v1, p0, Lcom/google/gson/Gson;->serializeNulls:Z
  1081. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
  1082. const-string v1, ",factories:"
  1083. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1084. iget-object v1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
  1085. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  1086. const-string v1, ",instanceCreators:"
  1087. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1088. iget-object v1, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
  1089. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  1090. const-string v1, "}"
  1091. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  1092. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  1093. move-result-object v0
  1094. return-object v0
  1095. .end method