1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753 |
- .class public final Lcom/google/gson/Gson;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lcom/google/gson/Gson$FutureTypeAdapter;
- }
- .end annotation
- # static fields
- .field static final DEFAULT_COMPLEX_MAP_KEYS:Z = false
- .field static final DEFAULT_ESCAPE_HTML:Z = true
- .field static final DEFAULT_JSON_NON_EXECUTABLE:Z = false
- .field static final DEFAULT_LENIENT:Z = false
- .field static final DEFAULT_PRETTY_PRINT:Z = false
- .field static final DEFAULT_SERIALIZE_NULLS:Z = false
- .field static final DEFAULT_SPECIALIZE_FLOAT_VALUES:Z = false
- .field private static final JSON_NON_EXECUTABLE_PREFIX:Ljava/lang/String; = ")]}\'\n"
- .field private static final NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Lcom/google/gson/reflect/TypeToken<",
- "*>;"
- }
- .end annotation
- .end field
- # instance fields
- .field private final calls:Ljava/lang/ThreadLocal;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/lang/ThreadLocal<",
- "Ljava/util/Map<",
- "Lcom/google/gson/reflect/TypeToken<",
- "*>;",
- "Lcom/google/gson/Gson$FutureTypeAdapter<",
- "*>;>;>;"
- }
- .end annotation
- .end field
- .field private final constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- .field private final excluder:Lcom/google/gson/internal/Excluder;
- .field private final factories:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Lcom/google/gson/TypeAdapterFactory;",
- ">;"
- }
- .end annotation
- .end field
- .field private final fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
- .field private final generateNonExecutableJson:Z
- .field private final htmlSafe:Z
- .field private final jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- .field private final lenient:Z
- .field private final prettyPrinting:Z
- .field private final serializeNulls:Z
- .field private final typeTokenCache:Ljava/util/Map;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Map<",
- "Lcom/google/gson/reflect/TypeToken<",
- "*>;",
- "Lcom/google/gson/TypeAdapter<",
- "*>;>;"
- }
- .end annotation
- .end field
- # direct methods
- .method static constructor <clinit>()V
- .locals 1
- const-class v0, Ljava/lang/Object;
- invoke-static {v0}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/Class;)Lcom/google/gson/reflect/TypeToken;
- move-result-object v0
- sput-object v0, Lcom/google/gson/Gson;->NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
- return-void
- .end method
- .method public constructor <init>()V
- .locals 13
- sget-object v1, Lcom/google/gson/internal/Excluder;->DEFAULT:Lcom/google/gson/internal/Excluder;
- sget-object v2, Lcom/google/gson/FieldNamingPolicy;->IDENTITY:Lcom/google/gson/FieldNamingPolicy;
- invoke-static {}, Ljava/util/Collections;->emptyMap()Ljava/util/Map;
- move-result-object v3
- sget-object v11, Lcom/google/gson/LongSerializationPolicy;->DEFAULT:Lcom/google/gson/LongSerializationPolicy;
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object v12
- const/4 v4, 0x0
- const/4 v5, 0x0
- const/4 v6, 0x0
- const/4 v7, 0x1
- const/4 v8, 0x0
- const/4 v9, 0x0
- const/4 v10, 0x0
- move-object v0, p0
- 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
- return-void
- .end method
- .method constructor <init>(Lcom/google/gson/internal/Excluder;Lcom/google/gson/FieldNamingStrategy;Ljava/util/Map;ZZZZZZZLcom/google/gson/LongSerializationPolicy;Ljava/util/List;)V
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/internal/Excluder;",
- "Lcom/google/gson/FieldNamingStrategy;",
- "Ljava/util/Map<",
- "Ljava/lang/reflect/Type;",
- "Lcom/google/gson/InstanceCreator<",
- "*>;>;ZZZZZZZ",
- "Lcom/google/gson/LongSerializationPolicy;",
- "Ljava/util/List<",
- "Lcom/google/gson/TypeAdapterFactory;",
- ">;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Ljava/lang/ThreadLocal;
- invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V
- iput-object v0, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
- new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
- invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
- iput-object v0, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
- new-instance v0, Lcom/google/gson/internal/ConstructorConstructor;
- invoke-direct {v0, p3}, Lcom/google/gson/internal/ConstructorConstructor;-><init>(Ljava/util/Map;)V
- iput-object v0, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- iput-object p1, p0, Lcom/google/gson/Gson;->excluder:Lcom/google/gson/internal/Excluder;
- iput-object p2, p0, Lcom/google/gson/Gson;->fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
- iput-boolean p4, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- iput-boolean p6, p0, Lcom/google/gson/Gson;->generateNonExecutableJson:Z
- iput-boolean p7, p0, Lcom/google/gson/Gson;->htmlSafe:Z
- iput-boolean p8, p0, Lcom/google/gson/Gson;->prettyPrinting:Z
- iput-boolean p9, p0, Lcom/google/gson/Gson;->lenient:Z
- new-instance p3, Ljava/util/ArrayList;
- invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->JSON_ELEMENT_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/ObjectTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- invoke-interface {p3, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- invoke-interface {p3, p12}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->INTEGER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BOOLEAN_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BYTE_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->SHORT_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- invoke-static {p11}, Lcom/google/gson/Gson;->longAdapter(Lcom/google/gson/LongSerializationPolicy;)Lcom/google/gson/TypeAdapter;
- move-result-object p4
- sget-object p6, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
- const-class p7, Ljava/lang/Long;
- 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;
- move-result-object p6
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p6, Ljava/lang/Double;->TYPE:Ljava/lang/Class;
- const-class p7, Ljava/lang/Double;
- invoke-direct {p0, p10}, Lcom/google/gson/Gson;->doubleAdapter(Z)Lcom/google/gson/TypeAdapter;
- move-result-object p8
- 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;
- move-result-object p6
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p6, Ljava/lang/Float;->TYPE:Ljava/lang/Class;
- const-class p7, Ljava/lang/Float;
- invoke-direct {p0, p10}, Lcom/google/gson/Gson;->floatAdapter(Z)Lcom/google/gson/TypeAdapter;
- move-result-object p8
- 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;
- move-result-object p6
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->NUMBER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_INTEGER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_BOOLEAN_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- const-class p6, Ljava/util/concurrent/atomic/AtomicLong;
- invoke-static {p4}, Lcom/google/gson/Gson;->atomicLongAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
- move-result-object p7
- invoke-static {p6, p7}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
- move-result-object p6
- invoke-interface {p3, p6}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- const-class p6, Ljava/util/concurrent/atomic/AtomicLongArray;
- invoke-static {p4}, Lcom/google/gson/Gson;->atomicLongArrayAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
- move-result-object p4
- invoke-static {p6, p4}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
- move-result-object p4
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->ATOMIC_INTEGER_ARRAY_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CHARACTER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_BUILDER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->STRING_BUFFER_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- const-class p4, Ljava/math/BigDecimal;
- sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->BIG_DECIMAL:Lcom/google/gson/TypeAdapter;
- invoke-static {p4, p6}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
- move-result-object p4
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- const-class p4, Ljava/math/BigInteger;
- sget-object p6, Lcom/google/gson/internal/bind/TypeAdapters;->BIG_INTEGER:Lcom/google/gson/TypeAdapter;
- invoke-static {p4, p6}, Lcom/google/gson/internal/bind/TypeAdapters;->newFactory(Ljava/lang/Class;Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapterFactory;
- move-result-object p4
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->URL_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->URI_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->UUID_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CURRENCY_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->LOCALE_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->INET_ADDRESS_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->BIT_SET_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/DateTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CALENDAR_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TimeTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/SqlDateTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->TIMESTAMP_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/ArrayTypeAdapter;->FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->CLASS_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance p4, Lcom/google/gson/internal/bind/CollectionTypeAdapterFactory;
- iget-object p6, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- invoke-direct {p4, p6}, Lcom/google/gson/internal/bind/CollectionTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;)V
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance p4, Lcom/google/gson/internal/bind/MapTypeAdapterFactory;
- iget-object p6, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- invoke-direct {p4, p6, p5}, Lcom/google/gson/internal/bind/MapTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;Z)V
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance p4, Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- iget-object p5, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- invoke-direct {p4, p5}, Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;-><init>(Lcom/google/gson/internal/ConstructorConstructor;)V
- iput-object p4, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- iget-object p4, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- sget-object p4, Lcom/google/gson/internal/bind/TypeAdapters;->ENUM_FACTORY:Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance p4, Lcom/google/gson/internal/bind/ReflectiveTypeAdapterFactory;
- iget-object p5, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- iget-object p6, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- 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
- invoke-interface {p3, p4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- invoke-static {p3}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
- move-result-object p1
- iput-object p1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
- return-void
- .end method
- .method private static assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
- .locals 0
- if-eqz p0, :cond_1
- :try_start_0
- invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
- move-result-object p0
- sget-object p1, Lcom/google/gson/stream/JsonToken;->END_DOCUMENT:Lcom/google/gson/stream/JsonToken;
- if-ne p0, p1, :cond_0
- goto :goto_0
- :cond_0
- new-instance p0, Lcom/google/gson/JsonIOException;
- const-string p1, "JSON document was not fully consumed."
- invoke-direct {p0, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/String;)V
- throw p0
- :try_end_0
- .catch Lcom/google/gson/stream/MalformedJsonException; {:try_start_0 .. :try_end_0} :catch_1
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- :catch_0
- move-exception p0
- new-instance p1, Lcom/google/gson/JsonIOException;
- invoke-direct {p1, p0}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
- throw p1
- :catch_1
- move-exception p0
- new-instance p1, Lcom/google/gson/JsonSyntaxException;
- invoke-direct {p1, p0}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
- throw p1
- :cond_1
- :goto_0
- return-void
- .end method
- .method private static atomicLongAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/lang/Number;",
- ">;)",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/util/concurrent/atomic/AtomicLong;",
- ">;"
- }
- .end annotation
- new-instance v0, Lcom/google/gson/Gson$4;
- invoke-direct {v0, p0}, Lcom/google/gson/Gson$4;-><init>(Lcom/google/gson/TypeAdapter;)V
- invoke-virtual {v0}, Lcom/google/gson/TypeAdapter;->nullSafe()Lcom/google/gson/TypeAdapter;
- move-result-object p0
- return-object p0
- .end method
- .method private static atomicLongArrayAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/lang/Number;",
- ">;)",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/util/concurrent/atomic/AtomicLongArray;",
- ">;"
- }
- .end annotation
- new-instance v0, Lcom/google/gson/Gson$5;
- invoke-direct {v0, p0}, Lcom/google/gson/Gson$5;-><init>(Lcom/google/gson/TypeAdapter;)V
- invoke-virtual {v0}, Lcom/google/gson/TypeAdapter;->nullSafe()Lcom/google/gson/TypeAdapter;
- move-result-object p0
- return-object p0
- .end method
- .method static checkValidFloatingPoint(D)V
- .locals 2
- invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z
- move-result v0
- if-nez v0, :cond_0
- invoke-static {p0, p1}, Ljava/lang/Double;->isInfinite(D)Z
- move-result v0
- if-nez v0, :cond_0
- return-void
- :cond_0
- new-instance v0, Ljava/lang/IllegalArgumentException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v1, p0, p1}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;
- const-string p0, " is not a valid double value as per JSON specification. To override this"
- invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p0, " behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method."
- invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p0
- invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method private doubleAdapter(Z)Lcom/google/gson/TypeAdapter;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(Z)",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/lang/Number;",
- ">;"
- }
- .end annotation
- if-eqz p1, :cond_0
- sget-object p1, Lcom/google/gson/internal/bind/TypeAdapters;->DOUBLE:Lcom/google/gson/TypeAdapter;
- return-object p1
- :cond_0
- new-instance p1, Lcom/google/gson/Gson$1;
- invoke-direct {p1, p0}, Lcom/google/gson/Gson$1;-><init>(Lcom/google/gson/Gson;)V
- return-object p1
- .end method
- .method private floatAdapter(Z)Lcom/google/gson/TypeAdapter;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(Z)",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/lang/Number;",
- ">;"
- }
- .end annotation
- if-eqz p1, :cond_0
- sget-object p1, Lcom/google/gson/internal/bind/TypeAdapters;->FLOAT:Lcom/google/gson/TypeAdapter;
- return-object p1
- :cond_0
- new-instance p1, Lcom/google/gson/Gson$2;
- invoke-direct {p1, p0}, Lcom/google/gson/Gson$2;-><init>(Lcom/google/gson/Gson;)V
- return-object p1
- .end method
- .method private static longAdapter(Lcom/google/gson/LongSerializationPolicy;)Lcom/google/gson/TypeAdapter;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lcom/google/gson/LongSerializationPolicy;",
- ")",
- "Lcom/google/gson/TypeAdapter<",
- "Ljava/lang/Number;",
- ">;"
- }
- .end annotation
- sget-object v0, Lcom/google/gson/LongSerializationPolicy;->DEFAULT:Lcom/google/gson/LongSerializationPolicy;
- if-ne p0, v0, :cond_0
- sget-object p0, Lcom/google/gson/internal/bind/TypeAdapters;->LONG:Lcom/google/gson/TypeAdapter;
- return-object p0
- :cond_0
- new-instance p0, Lcom/google/gson/Gson$3;
- invoke-direct {p0}, Lcom/google/gson/Gson$3;-><init>()V
- return-object p0
- .end method
- # virtual methods
- .method public excluder()Lcom/google/gson/internal/Excluder;
- .locals 1
- iget-object v0, p0, Lcom/google/gson/Gson;->excluder:Lcom/google/gson/internal/Excluder;
- return-object v0
- .end method
- .method public fieldNamingStrategy()Lcom/google/gson/FieldNamingStrategy;
- .locals 1
- iget-object v0, p0, Lcom/google/gson/Gson;->fieldNamingStrategy:Lcom/google/gson/FieldNamingStrategy;
- return-object v0
- .end method
- .method public fromJson(Lcom/google/gson/JsonElement;Ljava/lang/Class;)Ljava/lang/Object;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Lcom/google/gson/JsonElement;",
- "Ljava/lang/Class<",
- "TT;>;)TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object p1
- invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
- move-result-object p2
- invoke-virtual {p2, p1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
- .method public fromJson(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Lcom/google/gson/JsonElement;",
- "Ljava/lang/reflect/Type;",
- ")TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- if-nez p1, :cond_0
- const/4 p1, 0x0
- return-object p1
- :cond_0
- new-instance v0, Lcom/google/gson/internal/bind/JsonTreeReader;
- invoke-direct {v0, p1}, Lcom/google/gson/internal/bind/JsonTreeReader;-><init>(Lcom/google/gson/JsonElement;)V
- invoke-virtual {p0, v0, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
- .method public fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Lcom/google/gson/stream/JsonReader;",
- "Ljava/lang/reflect/Type;",
- ")TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;,
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->isLenient()Z
- move-result v0
- const/4 v1, 0x1
- invoke-virtual {p1, v1}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
- :try_start_0
- invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
- const/4 v1, 0x0
- invoke-static {p2}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
- move-result-object p2
- invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- move-result-object p2
- invoke-virtual {p2, p1}, Lcom/google/gson/TypeAdapter;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
- move-result-object p2
- :try_end_0
- .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_2
- .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_1
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
- return-object p2
- :catchall_0
- move-exception p2
- goto :goto_0
- :catch_0
- move-exception p2
- :try_start_1
- new-instance v1, Lcom/google/gson/JsonSyntaxException;
- invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
- throw v1
- :catch_1
- move-exception p2
- new-instance v1, Lcom/google/gson/JsonSyntaxException;
- invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
- throw v1
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- :catch_2
- move-exception p2
- if-eqz v1, :cond_0
- const/4 p2, 0x0
- invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
- return-object p2
- :cond_0
- :try_start_2
- new-instance v1, Lcom/google/gson/JsonSyntaxException;
- invoke-direct {v1, p2}, Lcom/google/gson/JsonSyntaxException;-><init>(Ljava/lang/Throwable;)V
- throw v1
- :try_end_2
- .catchall {:try_start_2 .. :try_end_2} :catchall_0
- :goto_0
- invoke-virtual {p1, v0}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
- throw p2
- .end method
- .method public fromJson(Ljava/io/Reader;Ljava/lang/Class;)Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/io/Reader;",
- "Ljava/lang/Class<",
- "TT;>;)TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonSyntaxException;,
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
- move-result-object p1
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object v0
- invoke-static {v0, p1}, Lcom/google/gson/Gson;->assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
- invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
- move-result-object p1
- invoke-virtual {p1, v0}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
- .method public fromJson(Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/io/Reader;",
- "Ljava/lang/reflect/Type;",
- ")TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;,
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
- move-result-object p1
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Lcom/google/gson/stream/JsonReader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object p2
- invoke-static {p2, p1}, Lcom/google/gson/Gson;->assertFullConsumption(Ljava/lang/Object;Lcom/google/gson/stream/JsonReader;)V
- return-object p2
- .end method
- .method public fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/lang/String;",
- "Ljava/lang/Class<",
- "TT;>;)TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object p1
- invoke-static {p2}, Lcom/google/gson/internal/Primitives;->wrap(Ljava/lang/Class;)Ljava/lang/Class;
- move-result-object p2
- invoke-virtual {p2, p1}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
- .method public fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/lang/String;",
- "Ljava/lang/reflect/Type;",
- ")TT;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonSyntaxException;
- }
- .end annotation
- if-nez p1, :cond_0
- const/4 p1, 0x0
- return-object p1
- :cond_0
- new-instance v0, Ljava/io/StringReader;
- invoke-direct {v0, p1}, Ljava/io/StringReader;-><init>(Ljava/lang/String;)V
- invoke-virtual {p0, v0, p2}, Lcom/google/gson/Gson;->fromJson(Ljava/io/Reader;Ljava/lang/reflect/Type;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
- .method public getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- .locals 5
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Lcom/google/gson/reflect/TypeToken<",
- "TT;>;)",
- "Lcom/google/gson/TypeAdapter<",
- "TT;>;"
- }
- .end annotation
- iget-object v0, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
- if-nez p1, :cond_0
- sget-object v1, Lcom/google/gson/Gson;->NULL_KEY_SURROGATE:Lcom/google/gson/reflect/TypeToken;
- goto :goto_0
- :cond_0
- move-object v1, p1
- :goto_0
- invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Lcom/google/gson/TypeAdapter;
- if-eqz v0, :cond_1
- return-object v0
- :cond_1
- iget-object v0, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
- invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/util/Map;
- const/4 v1, 0x0
- if-nez v0, :cond_2
- new-instance v0, Ljava/util/HashMap;
- invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
- iget-object v1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
- invoke-virtual {v1, v0}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V
- const/4 v1, 0x1
- :cond_2
- invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v2
- check-cast v2, Lcom/google/gson/Gson$FutureTypeAdapter;
- if-eqz v2, :cond_3
- return-object v2
- :cond_3
- :try_start_0
- new-instance v2, Lcom/google/gson/Gson$FutureTypeAdapter;
- invoke-direct {v2}, Lcom/google/gson/Gson$FutureTypeAdapter;-><init>()V
- invoke-interface {v0, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- iget-object v3, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
- invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
- move-result-object v3
- :cond_4
- invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
- move-result v4
- if-eqz v4, :cond_6
- invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
- move-result-object v4
- check-cast v4, Lcom/google/gson/TypeAdapterFactory;
- invoke-interface {v4, p0, p1}, Lcom/google/gson/TypeAdapterFactory;->create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- move-result-object v4
- if-eqz v4, :cond_4
- invoke-virtual {v2, v4}, Lcom/google/gson/Gson$FutureTypeAdapter;->setDelegate(Lcom/google/gson/TypeAdapter;)V
- iget-object v2, p0, Lcom/google/gson/Gson;->typeTokenCache:Ljava/util/Map;
- invoke-interface {v2, p1, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
- if-eqz v1, :cond_5
- iget-object p1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
- invoke-virtual {p1}, Ljava/lang/ThreadLocal;->remove()V
- :cond_5
- return-object v4
- :cond_6
- :try_start_1
- new-instance v2, Ljava/lang/IllegalArgumentException;
- new-instance v3, Ljava/lang/StringBuilder;
- invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
- const-string v4, "GSON cannot handle "
- invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v3
- invoke-direct {v2, v3}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw v2
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- :catchall_0
- move-exception v2
- invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
- if-eqz v1, :cond_7
- iget-object p1, p0, Lcom/google/gson/Gson;->calls:Ljava/lang/ThreadLocal;
- invoke-virtual {p1}, Ljava/lang/ThreadLocal;->remove()V
- :cond_7
- goto :goto_2
- :goto_1
- throw v2
- :goto_2
- goto :goto_1
- .end method
- .method public getAdapter(Ljava/lang/Class;)Lcom/google/gson/TypeAdapter;
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Ljava/lang/Class<",
- "TT;>;)",
- "Lcom/google/gson/TypeAdapter<",
- "TT;>;"
- }
- .end annotation
- invoke-static {p1}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/Class;)Lcom/google/gson/reflect/TypeToken;
- move-result-object p1
- invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- move-result-object p1
- return-object p1
- .end method
- .method public getDelegateAdapter(Lcom/google/gson/TypeAdapterFactory;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- .locals 3
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">(",
- "Lcom/google/gson/TypeAdapterFactory;",
- "Lcom/google/gson/reflect/TypeToken<",
- "TT;>;)",
- "Lcom/google/gson/TypeAdapter<",
- "TT;>;"
- }
- .end annotation
- iget-object v0, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
- invoke-interface {v0, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
- move-result v0
- if-nez v0, :cond_0
- iget-object p1, p0, Lcom/google/gson/Gson;->jsonAdapterFactory:Lcom/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory;
- :cond_0
- const/4 v0, 0x0
- iget-object v1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
- invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
- move-result-object v1
- :cond_1
- :goto_0
- invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
- move-result v2
- if-eqz v2, :cond_3
- invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
- move-result-object v2
- check-cast v2, Lcom/google/gson/TypeAdapterFactory;
- if-nez v0, :cond_2
- if-ne v2, p1, :cond_1
- const/4 v0, 0x1
- goto :goto_0
- :cond_2
- invoke-interface {v2, p0, p2}, Lcom/google/gson/TypeAdapterFactory;->create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- move-result-object v2
- if-eqz v2, :cond_1
- return-object v2
- :cond_3
- new-instance p1, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "GSON cannot serialize "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p2
- invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method public htmlSafe()Z
- .locals 1
- iget-boolean v0, p0, Lcom/google/gson/Gson;->htmlSafe:Z
- return v0
- .end method
- .method public newJsonReader(Ljava/io/Reader;)Lcom/google/gson/stream/JsonReader;
- .locals 1
- new-instance v0, Lcom/google/gson/stream/JsonReader;
- invoke-direct {v0, p1}, Lcom/google/gson/stream/JsonReader;-><init>(Ljava/io/Reader;)V
- iget-boolean p1, p0, Lcom/google/gson/Gson;->lenient:Z
- invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonReader;->setLenient(Z)V
- return-object v0
- .end method
- .method public newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-boolean v0, p0, Lcom/google/gson/Gson;->generateNonExecutableJson:Z
- if-eqz v0, :cond_0
- const-string v0, ")]}\'\n"
- invoke-virtual {p1, v0}, Ljava/io/Writer;->write(Ljava/lang/String;)V
- :cond_0
- new-instance v0, Lcom/google/gson/stream/JsonWriter;
- invoke-direct {v0, p1}, Lcom/google/gson/stream/JsonWriter;-><init>(Ljava/io/Writer;)V
- iget-boolean p1, p0, Lcom/google/gson/Gson;->prettyPrinting:Z
- if-eqz p1, :cond_1
- const-string p1, " "
- invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonWriter;->setIndent(Ljava/lang/String;)V
- :cond_1
- iget-boolean p1, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- invoke-virtual {v0, p1}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- return-object v0
- .end method
- .method public serializeNulls()Z
- .locals 1
- iget-boolean v0, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- return v0
- .end method
- .method public toJson(Lcom/google/gson/JsonElement;)Ljava/lang/String;
- .locals 1
- new-instance v0, Ljava/io/StringWriter;
- invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
- invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
- invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
- move-result-object p1
- return-object p1
- .end method
- .method public toJson(Ljava/lang/Object;)Ljava/lang/String;
- .locals 1
- if-nez p1, :cond_0
- sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
- invoke-virtual {p0, p1}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;)Ljava/lang/String;
- move-result-object p1
- return-object p1
- :cond_0
- invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
- move-result-object v0
- invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;)Ljava/lang/String;
- move-result-object p1
- return-object p1
- .end method
- .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;)Ljava/lang/String;
- .locals 1
- new-instance v0, Ljava/io/StringWriter;
- invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
- invoke-virtual {p0, p1, p2, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
- invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
- move-result-object p1
- return-object p1
- .end method
- .method public toJson(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
- .locals 4
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
- move-result v0
- const/4 v1, 0x1
- invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->isHtmlSafe()Z
- move-result v1
- iget-boolean v2, p0, Lcom/google/gson/Gson;->htmlSafe:Z
- invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p2}, Lcom/google/gson/stream/JsonWriter;->getSerializeNulls()Z
- move-result v2
- iget-boolean v3, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- invoke-virtual {p2, v3}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- :try_start_0
- invoke-static {p1, p2}, Lcom/google/gson/internal/Streams;->write(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-virtual {p2, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- return-void
- :catchall_0
- move-exception p1
- goto :goto_0
- :catch_0
- move-exception p1
- :try_start_1
- new-instance v3, Lcom/google/gson/JsonIOException;
- invoke-direct {v3, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
- throw v3
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- :goto_0
- invoke-virtual {p2, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p2, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p2, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- throw p1
- .end method
- .method public toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- :try_start_0
- invoke-static {p2}, Lcom/google/gson/internal/Streams;->writerForAppendable(Ljava/lang/Appendable;)Ljava/io/Writer;
- move-result-object p2
- invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
- move-result-object p2
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Lcom/google/gson/stream/JsonWriter;)V
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- return-void
- :catch_0
- move-exception p1
- new-instance p2, Lcom/google/gson/JsonIOException;
- invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
- throw p2
- .end method
- .method public toJson(Ljava/lang/Object;Ljava/lang/Appendable;)V
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- if-eqz p1, :cond_0
- invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
- move-result-object v0
- invoke-virtual {p0, p1, v0, p2}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
- goto :goto_0
- :cond_0
- sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
- invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson;->toJson(Lcom/google/gson/JsonElement;Ljava/lang/Appendable;)V
- :goto_0
- return-void
- .end method
- .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
- .locals 4
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- invoke-static {p2}, Lcom/google/gson/reflect/TypeToken;->get(Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken;
- move-result-object p2
- invoke-virtual {p0, p2}, Lcom/google/gson/Gson;->getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
- move-result-object p2
- invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->isLenient()Z
- move-result v0
- const/4 v1, 0x1
- invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->isHtmlSafe()Z
- move-result v1
- iget-boolean v2, p0, Lcom/google/gson/Gson;->htmlSafe:Z
- invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p3}, Lcom/google/gson/stream/JsonWriter;->getSerializeNulls()Z
- move-result v2
- iget-boolean v3, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- invoke-virtual {p3, v3}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- :try_start_0
- invoke-virtual {p2, p3, p1}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-virtual {p3, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- return-void
- :catchall_0
- move-exception p1
- goto :goto_0
- :catch_0
- move-exception p1
- :try_start_1
- new-instance p2, Lcom/google/gson/JsonIOException;
- invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
- throw p2
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- :goto_0
- invoke-virtual {p3, v0}, Lcom/google/gson/stream/JsonWriter;->setLenient(Z)V
- invoke-virtual {p3, v1}, Lcom/google/gson/stream/JsonWriter;->setHtmlSafe(Z)V
- invoke-virtual {p3, v2}, Lcom/google/gson/stream/JsonWriter;->setSerializeNulls(Z)V
- throw p1
- .end method
- .method public toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Ljava/lang/Appendable;)V
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Lcom/google/gson/JsonIOException;
- }
- .end annotation
- :try_start_0
- invoke-static {p3}, Lcom/google/gson/internal/Streams;->writerForAppendable(Ljava/lang/Appendable;)Ljava/io/Writer;
- move-result-object p3
- invoke-virtual {p0, p3}, Lcom/google/gson/Gson;->newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
- move-result-object p3
- invoke-virtual {p0, p1, p2, p3}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- return-void
- :catch_0
- move-exception p1
- new-instance p2, Lcom/google/gson/JsonIOException;
- invoke-direct {p2, p1}, Lcom/google/gson/JsonIOException;-><init>(Ljava/lang/Throwable;)V
- throw p2
- .end method
- .method public toJsonTree(Ljava/lang/Object;)Lcom/google/gson/JsonElement;
- .locals 1
- if-nez p1, :cond_0
- sget-object p1, Lcom/google/gson/JsonNull;->INSTANCE:Lcom/google/gson/JsonNull;
- return-object p1
- :cond_0
- invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
- move-result-object v0
- invoke-virtual {p0, p1, v0}, Lcom/google/gson/Gson;->toJsonTree(Ljava/lang/Object;Ljava/lang/reflect/Type;)Lcom/google/gson/JsonElement;
- move-result-object p1
- return-object p1
- .end method
- .method public toJsonTree(Ljava/lang/Object;Ljava/lang/reflect/Type;)Lcom/google/gson/JsonElement;
- .locals 1
- new-instance v0, Lcom/google/gson/internal/bind/JsonTreeWriter;
- invoke-direct {v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;-><init>()V
- invoke-virtual {p0, p1, p2, v0}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/stream/JsonWriter;)V
- invoke-virtual {v0}, Lcom/google/gson/internal/bind/JsonTreeWriter;->get()Lcom/google/gson/JsonElement;
- move-result-object p1
- return-object p1
- .end method
- .method public toString()Ljava/lang/String;
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- const-string v1, "{serializeNulls:"
- invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
- iget-boolean v1, p0, Lcom/google/gson/Gson;->serializeNulls:Z
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
- const-string v1, ",factories:"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lcom/google/gson/Gson;->factories:Ljava/util/List;
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string v1, ",instanceCreators:"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lcom/google/gson/Gson;->constructorConstructor:Lcom/google/gson/internal/ConstructorConstructor;
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string v1, "}"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
|