Gson$1.smali 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. .class Lcom/google/gson/Gson$1;
  2. .super Lcom/google/gson/TypeAdapter;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingMethod;
  6. value = Lcom/google/gson/Gson;->doubleAdapter(Z)Lcom/google/gson/TypeAdapter;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x0
  10. name = null
  11. .end annotation
  12. .annotation system Ldalvik/annotation/Signature;
  13. value = {
  14. "Lcom/google/gson/TypeAdapter<",
  15. "Ljava/lang/Number;",
  16. ">;"
  17. }
  18. .end annotation
  19. # instance fields
  20. .field final synthetic this$0:Lcom/google/gson/Gson;
  21. # direct methods
  22. .method constructor <init>(Lcom/google/gson/Gson;)V
  23. .locals 0
  24. iput-object p1, p0, Lcom/google/gson/Gson$1;->this$0:Lcom/google/gson/Gson;
  25. invoke-direct {p0}, Lcom/google/gson/TypeAdapter;-><init>()V
  26. return-void
  27. .end method
  28. # virtual methods
  29. .method public read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Double;
  30. .locals 2
  31. .annotation system Ldalvik/annotation/Throws;
  32. value = {
  33. Ljava/io/IOException;
  34. }
  35. .end annotation
  36. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
  37. move-result-object v0
  38. sget-object v1, Lcom/google/gson/stream/JsonToken;->NULL:Lcom/google/gson/stream/JsonToken;
  39. if-ne v0, v1, :cond_0
  40. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->nextNull()V
  41. const/4 p1, 0x0
  42. return-object p1
  43. :cond_0
  44. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->nextDouble()D
  45. move-result-wide v0
  46. invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
  47. move-result-object p1
  48. return-object p1
  49. .end method
  50. .method public bridge synthetic read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
  51. .locals 0
  52. .annotation system Ldalvik/annotation/Throws;
  53. value = {
  54. Ljava/io/IOException;
  55. }
  56. .end annotation
  57. invoke-virtual {p0, p1}, Lcom/google/gson/Gson$1;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Double;
  58. move-result-object p1
  59. return-object p1
  60. .end method
  61. .method public write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Number;)V
  62. .locals 2
  63. .annotation system Ldalvik/annotation/Throws;
  64. value = {
  65. Ljava/io/IOException;
  66. }
  67. .end annotation
  68. if-nez p2, :cond_0
  69. invoke-virtual {p1}, Lcom/google/gson/stream/JsonWriter;->nullValue()Lcom/google/gson/stream/JsonWriter;
  70. return-void
  71. :cond_0
  72. invoke-virtual {p2}, Ljava/lang/Number;->doubleValue()D
  73. move-result-wide v0
  74. invoke-static {v0, v1}, Lcom/google/gson/Gson;->checkValidFloatingPoint(D)V
  75. invoke-virtual {p1, p2}, Lcom/google/gson/stream/JsonWriter;->value(Ljava/lang/Number;)Lcom/google/gson/stream/JsonWriter;
  76. return-void
  77. .end method
  78. .method public bridge synthetic write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
  79. .locals 0
  80. .annotation system Ldalvik/annotation/Throws;
  81. value = {
  82. Ljava/io/IOException;
  83. }
  84. .end annotation
  85. check-cast p2, Ljava/lang/Number;
  86. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson$1;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Number;)V
  87. return-void
  88. .end method