Gson$5.smali 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. .class final Lcom/google/gson/Gson$5;
  2. .super Lcom/google/gson/TypeAdapter;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingMethod;
  6. value = Lcom/google/gson/Gson;->atomicLongArrayAdapter(Lcom/google/gson/TypeAdapter;)Lcom/google/gson/TypeAdapter;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x8
  10. name = null
  11. .end annotation
  12. .annotation system Ldalvik/annotation/Signature;
  13. value = {
  14. "Lcom/google/gson/TypeAdapter<",
  15. "Ljava/util/concurrent/atomic/AtomicLongArray;",
  16. ">;"
  17. }
  18. .end annotation
  19. # instance fields
  20. .field final synthetic val$longAdapter:Lcom/google/gson/TypeAdapter;
  21. # direct methods
  22. .method constructor <init>(Lcom/google/gson/TypeAdapter;)V
  23. .locals 0
  24. iput-object p1, p0, Lcom/google/gson/Gson$5;->val$longAdapter:Lcom/google/gson/TypeAdapter;
  25. invoke-direct {p0}, Lcom/google/gson/TypeAdapter;-><init>()V
  26. return-void
  27. .end method
  28. # virtual methods
  29. .method public bridge synthetic read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
  30. .locals 0
  31. .annotation system Ldalvik/annotation/Throws;
  32. value = {
  33. Ljava/io/IOException;
  34. }
  35. .end annotation
  36. invoke-virtual {p0, p1}, Lcom/google/gson/Gson$5;->read(Lcom/google/gson/stream/JsonReader;)Ljava/util/concurrent/atomic/AtomicLongArray;
  37. move-result-object p1
  38. return-object p1
  39. .end method
  40. .method public read(Lcom/google/gson/stream/JsonReader;)Ljava/util/concurrent/atomic/AtomicLongArray;
  41. .locals 5
  42. .annotation system Ldalvik/annotation/Throws;
  43. value = {
  44. Ljava/io/IOException;
  45. }
  46. .end annotation
  47. new-instance v0, Ljava/util/ArrayList;
  48. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  49. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->beginArray()V
  50. :goto_0
  51. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->hasNext()Z
  52. move-result v1
  53. if-eqz v1, :cond_0
  54. iget-object v1, p0, Lcom/google/gson/Gson$5;->val$longAdapter:Lcom/google/gson/TypeAdapter;
  55. invoke-virtual {v1, p1}, Lcom/google/gson/TypeAdapter;->read(Lcom/google/gson/stream/JsonReader;)Ljava/lang/Object;
  56. move-result-object v1
  57. check-cast v1, Ljava/lang/Number;
  58. invoke-virtual {v1}, Ljava/lang/Number;->longValue()J
  59. move-result-wide v1
  60. invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
  61. move-result-object v1
  62. invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  63. goto :goto_0
  64. :cond_0
  65. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->endArray()V
  66. invoke-interface {v0}, Ljava/util/List;->size()I
  67. move-result p1
  68. new-instance v1, Ljava/util/concurrent/atomic/AtomicLongArray;
  69. invoke-direct {v1, p1}, Ljava/util/concurrent/atomic/AtomicLongArray;-><init>(I)V
  70. const/4 v2, 0x0
  71. :goto_1
  72. if-ge v2, p1, :cond_1
  73. invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
  74. move-result-object v3
  75. check-cast v3, Ljava/lang/Long;
  76. invoke-virtual {v3}, Ljava/lang/Long;->longValue()J
  77. move-result-wide v3
  78. invoke-virtual {v1, v2, v3, v4}, Ljava/util/concurrent/atomic/AtomicLongArray;->set(IJ)V
  79. add-int/lit8 v2, v2, 0x1
  80. goto :goto_1
  81. :cond_1
  82. return-object v1
  83. .end method
  84. .method public bridge synthetic write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
  85. .locals 0
  86. .annotation system Ldalvik/annotation/Throws;
  87. value = {
  88. Ljava/io/IOException;
  89. }
  90. .end annotation
  91. check-cast p2, Ljava/util/concurrent/atomic/AtomicLongArray;
  92. invoke-virtual {p0, p1, p2}, Lcom/google/gson/Gson$5;->write(Lcom/google/gson/stream/JsonWriter;Ljava/util/concurrent/atomic/AtomicLongArray;)V
  93. return-void
  94. .end method
  95. .method public write(Lcom/google/gson/stream/JsonWriter;Ljava/util/concurrent/atomic/AtomicLongArray;)V
  96. .locals 5
  97. .annotation system Ldalvik/annotation/Throws;
  98. value = {
  99. Ljava/io/IOException;
  100. }
  101. .end annotation
  102. invoke-virtual {p1}, Lcom/google/gson/stream/JsonWriter;->beginArray()Lcom/google/gson/stream/JsonWriter;
  103. invoke-virtual {p2}, Ljava/util/concurrent/atomic/AtomicLongArray;->length()I
  104. move-result v0
  105. const/4 v1, 0x0
  106. :goto_0
  107. if-ge v1, v0, :cond_0
  108. iget-object v2, p0, Lcom/google/gson/Gson$5;->val$longAdapter:Lcom/google/gson/TypeAdapter;
  109. invoke-virtual {p2, v1}, Ljava/util/concurrent/atomic/AtomicLongArray;->get(I)J
  110. move-result-wide v3
  111. invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
  112. move-result-object v3
  113. invoke-virtual {v2, p1, v3}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
  114. add-int/lit8 v1, v1, 0x1
  115. goto :goto_0
  116. :cond_0
  117. invoke-virtual {p1}, Lcom/google/gson/stream/JsonWriter;->endArray()Lcom/google/gson/stream/JsonWriter;
  118. return-void
  119. .end method