Challenge.smali 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. .class public final Lokhttp3/Challenge;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # instance fields
  5. .field private final charset:Ljava/nio/charset/Charset;
  6. .field private final realm:Ljava/lang/String;
  7. .field private final scheme:Ljava/lang/String;
  8. # direct methods
  9. .method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
  10. .locals 1
  11. sget-object v0, Lokhttp3/internal/Util;->ISO_8859_1:Ljava/nio/charset/Charset;
  12. invoke-direct {p0, p1, p2, v0}, Lokhttp3/Challenge;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)V
  13. return-void
  14. .end method
  15. .method private constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)V
  16. .locals 0
  17. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  18. if-eqz p1, :cond_2
  19. if-eqz p2, :cond_1
  20. if-eqz p3, :cond_0
  21. iput-object p1, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  22. iput-object p2, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  23. iput-object p3, p0, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  24. return-void
  25. :cond_0
  26. new-instance p1, Ljava/lang/NullPointerException;
  27. const-string p2, "charset == null"
  28. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  29. throw p1
  30. :cond_1
  31. new-instance p1, Ljava/lang/NullPointerException;
  32. const-string p2, "realm == null"
  33. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  34. throw p1
  35. :cond_2
  36. new-instance p1, Ljava/lang/NullPointerException;
  37. const-string p2, "scheme == null"
  38. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  39. throw p1
  40. .end method
  41. # virtual methods
  42. .method public charset()Ljava/nio/charset/Charset;
  43. .locals 1
  44. iget-object v0, p0, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  45. return-object v0
  46. .end method
  47. .method public equals(Ljava/lang/Object;)Z
  48. .locals 2
  49. instance-of v0, p1, Lokhttp3/Challenge;
  50. if-eqz v0, :cond_0
  51. check-cast p1, Lokhttp3/Challenge;
  52. iget-object v0, p1, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  53. iget-object v1, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  54. invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  55. move-result v0
  56. if-eqz v0, :cond_0
  57. iget-object v0, p1, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  58. iget-object v1, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  59. invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  60. move-result v0
  61. if-eqz v0, :cond_0
  62. iget-object p1, p1, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  63. iget-object v0, p0, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  64. invoke-virtual {p1, v0}, Ljava/nio/charset/Charset;->equals(Ljava/lang/Object;)Z
  65. move-result p1
  66. if-eqz p1, :cond_0
  67. const/4 p1, 0x1
  68. goto :goto_0
  69. :cond_0
  70. const/4 p1, 0x0
  71. :goto_0
  72. return p1
  73. .end method
  74. .method public hashCode()I
  75. .locals 2
  76. iget-object v0, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  77. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  78. move-result v0
  79. const/16 v1, 0x383
  80. add-int/2addr v1, v0
  81. mul-int/lit8 v1, v1, 0x1f
  82. iget-object v0, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  83. invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
  84. move-result v0
  85. add-int/2addr v1, v0
  86. mul-int/lit8 v1, v1, 0x1f
  87. iget-object v0, p0, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  88. invoke-virtual {v0}, Ljava/nio/charset/Charset;->hashCode()I
  89. move-result v0
  90. add-int/2addr v1, v0
  91. return v1
  92. .end method
  93. .method public realm()Ljava/lang/String;
  94. .locals 1
  95. iget-object v0, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  96. return-object v0
  97. .end method
  98. .method public scheme()Ljava/lang/String;
  99. .locals 1
  100. iget-object v0, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  101. return-object v0
  102. .end method
  103. .method public toString()Ljava/lang/String;
  104. .locals 2
  105. new-instance v0, Ljava/lang/StringBuilder;
  106. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  107. iget-object v1, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  108. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  109. const-string v1, " realm=\""
  110. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  111. iget-object v1, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  112. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  113. const-string v1, "\" charset=\""
  114. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  115. iget-object v1, p0, Lokhttp3/Challenge;->charset:Ljava/nio/charset/Charset;
  116. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  117. const-string v1, "\""
  118. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  119. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  120. move-result-object v0
  121. return-object v0
  122. .end method
  123. .method public withCharset(Ljava/nio/charset/Charset;)Lokhttp3/Challenge;
  124. .locals 3
  125. new-instance v0, Lokhttp3/Challenge;
  126. iget-object v1, p0, Lokhttp3/Challenge;->scheme:Ljava/lang/String;
  127. iget-object v2, p0, Lokhttp3/Challenge;->realm:Ljava/lang/String;
  128. invoke-direct {v0, v1, v2, p1}, Lokhttp3/Challenge;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)V
  129. return-object v0
  130. .end method