Route.smali 5.0 KB

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