JsonReader$1.smali 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. .class final Lcom/google/gson/stream/JsonReader$1;
  2. .super Lcom/google/gson/internal/JsonReaderInternalAccess;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lcom/google/gson/stream/JsonReader;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x8
  10. name = null
  11. .end annotation
  12. # direct methods
  13. .method constructor <init>()V
  14. .locals 0
  15. invoke-direct {p0}, Lcom/google/gson/internal/JsonReaderInternalAccess;-><init>()V
  16. return-void
  17. .end method
  18. # virtual methods
  19. .method public promoteNameToValue(Lcom/google/gson/stream/JsonReader;)V
  20. .locals 3
  21. .annotation system Ldalvik/annotation/Throws;
  22. value = {
  23. Ljava/io/IOException;
  24. }
  25. .end annotation
  26. instance-of v0, p1, Lcom/google/gson/internal/bind/JsonTreeReader;
  27. if-eqz v0, :cond_0
  28. check-cast p1, Lcom/google/gson/internal/bind/JsonTreeReader;
  29. invoke-virtual {p1}, Lcom/google/gson/internal/bind/JsonTreeReader;->promoteNameToValue()V
  30. return-void
  31. :cond_0
  32. iget v0, p1, Lcom/google/gson/stream/JsonReader;->peeked:I
  33. if-nez v0, :cond_1
  34. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->doPeek()I
  35. move-result v0
  36. :cond_1
  37. const/16 v1, 0xd
  38. if-ne v0, v1, :cond_2
  39. const/16 v0, 0x9
  40. :goto_0
  41. iput v0, p1, Lcom/google/gson/stream/JsonReader;->peeked:I
  42. goto :goto_1
  43. :cond_2
  44. const/16 v1, 0xc
  45. if-ne v0, v1, :cond_3
  46. const/16 v0, 0x8
  47. goto :goto_0
  48. :cond_3
  49. const/16 v1, 0xe
  50. if-ne v0, v1, :cond_4
  51. const/16 v0, 0xa
  52. goto :goto_0
  53. :goto_1
  54. return-void
  55. :cond_4
  56. new-instance v0, Ljava/lang/IllegalStateException;
  57. new-instance v1, Ljava/lang/StringBuilder;
  58. invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
  59. const-string v2, "Expected a name but was "
  60. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  61. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->peek()Lcom/google/gson/stream/JsonToken;
  62. move-result-object v2
  63. invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  64. invoke-virtual {p1}, Lcom/google/gson/stream/JsonReader;->locationString()Ljava/lang/String;
  65. move-result-object p1
  66. invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  67. invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  68. move-result-object p1
  69. invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  70. goto :goto_3
  71. :goto_2
  72. throw v0
  73. :goto_3
  74. goto :goto_2
  75. .end method