FormBody$Builder.smali 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. .class public final Lokhttp3/FormBody$Builder;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/FormBody;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x19
  10. name = "Builder"
  11. .end annotation
  12. # instance fields
  13. .field private final charset:Ljava/nio/charset/Charset;
  14. .field private final names:Ljava/util/List;
  15. .annotation system Ldalvik/annotation/Signature;
  16. value = {
  17. "Ljava/util/List<",
  18. "Ljava/lang/String;",
  19. ">;"
  20. }
  21. .end annotation
  22. .end field
  23. .field private final values:Ljava/util/List;
  24. .annotation system Ldalvik/annotation/Signature;
  25. value = {
  26. "Ljava/util/List<",
  27. "Ljava/lang/String;",
  28. ">;"
  29. }
  30. .end annotation
  31. .end field
  32. # direct methods
  33. .method public constructor <init>()V
  34. .locals 1
  35. const/4 v0, 0x0
  36. invoke-direct {p0, v0}, Lokhttp3/FormBody$Builder;-><init>(Ljava/nio/charset/Charset;)V
  37. return-void
  38. .end method
  39. .method public constructor <init>(Ljava/nio/charset/Charset;)V
  40. .locals 1
  41. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  42. new-instance v0, Ljava/util/ArrayList;
  43. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  44. iput-object v0, p0, Lokhttp3/FormBody$Builder;->names:Ljava/util/List;
  45. new-instance v0, Ljava/util/ArrayList;
  46. invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
  47. iput-object v0, p0, Lokhttp3/FormBody$Builder;->values:Ljava/util/List;
  48. iput-object p1, p0, Lokhttp3/FormBody$Builder;->charset:Ljava/nio/charset/Charset;
  49. return-void
  50. .end method
  51. # virtual methods
  52. .method public add(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/FormBody$Builder;
  53. .locals 8
  54. iget-object v0, p0, Lokhttp3/FormBody$Builder;->names:Ljava/util/List;
  55. iget-object v7, p0, Lokhttp3/FormBody$Builder;->charset:Ljava/nio/charset/Charset;
  56. const-string v2, " \"\':;<=>@[]^`{}|/\\?#&!$(),~"
  57. const/4 v3, 0x0
  58. const/4 v4, 0x0
  59. const/4 v5, 0x1
  60. const/4 v6, 0x1
  61. move-object v1, p1
  62. invoke-static/range {v1 .. v7}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  63. move-result-object p1
  64. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  65. iget-object p1, p0, Lokhttp3/FormBody$Builder;->values:Ljava/util/List;
  66. iget-object v6, p0, Lokhttp3/FormBody$Builder;->charset:Ljava/nio/charset/Charset;
  67. const-string v1, " \"\':;<=>@[]^`{}|/\\?#&!$(),~"
  68. const/4 v2, 0x0
  69. const/4 v4, 0x1
  70. move-object v0, p2
  71. invoke-static/range {v0 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  72. move-result-object p2
  73. invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  74. return-object p0
  75. .end method
  76. .method public addEncoded(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/FormBody$Builder;
  77. .locals 8
  78. iget-object v0, p0, Lokhttp3/FormBody$Builder;->names:Ljava/util/List;
  79. iget-object v7, p0, Lokhttp3/FormBody$Builder;->charset:Ljava/nio/charset/Charset;
  80. const-string v2, " \"\':;<=>@[]^`{}|/\\?#&!$(),~"
  81. const/4 v3, 0x1
  82. const/4 v4, 0x0
  83. const/4 v5, 0x1
  84. const/4 v6, 0x1
  85. move-object v1, p1
  86. invoke-static/range {v1 .. v7}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  87. move-result-object p1
  88. invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  89. iget-object p1, p0, Lokhttp3/FormBody$Builder;->values:Ljava/util/List;
  90. iget-object v6, p0, Lokhttp3/FormBody$Builder;->charset:Ljava/nio/charset/Charset;
  91. const-string v1, " \"\':;<=>@[]^`{}|/\\?#&!$(),~"
  92. const/4 v2, 0x1
  93. const/4 v3, 0x0
  94. const/4 v4, 0x1
  95. move-object v0, p2
  96. invoke-static/range {v0 .. v6}, Lokhttp3/HttpUrl;->canonicalize(Ljava/lang/String;Ljava/lang/String;ZZZZLjava/nio/charset/Charset;)Ljava/lang/String;
  97. move-result-object p2
  98. invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
  99. return-object p0
  100. .end method
  101. .method public build()Lokhttp3/FormBody;
  102. .locals 3
  103. new-instance v0, Lokhttp3/FormBody;
  104. iget-object v1, p0, Lokhttp3/FormBody$Builder;->names:Ljava/util/List;
  105. iget-object v2, p0, Lokhttp3/FormBody$Builder;->values:Ljava/util/List;
  106. invoke-direct {v0, v1, v2}, Lokhttp3/FormBody;-><init>(Ljava/util/List;Ljava/util/List;)V
  107. return-object v0
  108. .end method