Gson$2.smali 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. .class Lcom/google/gson/Gson$2;
  2. .super Lcom/google/gson/TypeAdapter;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingMethod;
  6. value = Lcom/google/gson/Gson;->floatAdapter(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$2;->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/Float;
  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. double-to-float p1, v0
  47. invoke-static {p1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
  48. move-result-object p1
  49. return-object p1
  50. .end method
  51. .method public bridge synthetic read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
  52. .locals 0
  53. .annotation system Ldalvik/annotation/Throws;
  54. value = {
  55. Ljava/io/IOException;
  56. }
  57. .end annotation
  58. invoke-virtual {p0, p1}, Lcom/google/gson/Gson$2;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Float;
  59. move-result-object p1
  60. return-object p1
  61. .end method
  62. .method public write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Number;)V
  63. .locals 2
  64. .annotation system Ldalvik/annotation/Throws;
  65. value = {
  66. Ljava/io/IOException;
  67. }
  68. .end annotation
  69. if-nez p2, :cond_0
  70. invoke-virtual {p1}, Lcom/google/gson/stream/JsonWriter;->nullValue()Lcom/google/gson/stream/JsonWriter;
  71. return-void
  72. :cond_0
  73. invoke-virtual {p2}, Ljava/lang/Number;->floatValue()F
  74. move-result v0
  75. float-to-double v0, v0
  76. invoke-static {v0, v1}, Lcom/google/gson/Gson;->checkValidFloatingPoint(D)V
  77. invoke-virtual {p1, p2}, Lcom/google/gson/stream/JsonWriter;->value(Ljava/lang/Number;)Lcom/google/gson/stream/JsonWriter;
  78. return-void
  79. .end method
  80. .method public bridge synthetic write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
  81. .locals 0
  82. .annotation system Ldalvik/annotation/Throws;
  83. value = {
  84. Ljava/io/IOException;
  85. }
  86. .end annotation
  87. check-cast p2, Ljava/lang/Number;
  88. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson$2;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Number;)V
  89. return-void
  90. .end method