Address.smali 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. .class public final Lokhttp3/Address;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # instance fields
  5. .field final certificatePinner:Lokhttp3/CertificatePinner;
  6. .field final connectionSpecs:Ljava/util/List;
  7. .annotation system Ldalvik/annotation/Signature;
  8. value = {
  9. "Ljava/util/List<",
  10. "Lokhttp3/ConnectionSpec;",
  11. ">;"
  12. }
  13. .end annotation
  14. .end field
  15. .field final dns:Lokhttp3/Dns;
  16. .field final hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  17. .field final protocols:Ljava/util/List;
  18. .annotation system Ldalvik/annotation/Signature;
  19. value = {
  20. "Ljava/util/List<",
  21. "Lokhttp3/Protocol;",
  22. ">;"
  23. }
  24. .end annotation
  25. .end field
  26. .field final proxy:Ljava/net/Proxy;
  27. .field final proxyAuthenticator:Lokhttp3/Authenticator;
  28. .field final proxySelector:Ljava/net/ProxySelector;
  29. .field final socketFactory:Ljavax/net/SocketFactory;
  30. .field final sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  31. .field final url:Lokhttp3/HttpUrl;
  32. # direct methods
  33. .method public constructor <init>(Ljava/lang/String;ILokhttp3/Dns;Ljavax/net/SocketFactory;Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/HostnameVerifier;Lokhttp3/CertificatePinner;Lokhttp3/Authenticator;Ljava/net/Proxy;Ljava/util/List;Ljava/util/List;Ljava/net/ProxySelector;)V
  34. .locals 2
  35. .annotation system Ldalvik/annotation/Signature;
  36. value = {
  37. "(",
  38. "Ljava/lang/String;",
  39. "I",
  40. "Lokhttp3/Dns;",
  41. "Ljavax/net/SocketFactory;",
  42. "Ljavax/net/ssl/SSLSocketFactory;",
  43. "Ljavax/net/ssl/HostnameVerifier;",
  44. "Lokhttp3/CertificatePinner;",
  45. "Lokhttp3/Authenticator;",
  46. "Ljava/net/Proxy;",
  47. "Ljava/util/List<",
  48. "Lokhttp3/Protocol;",
  49. ">;",
  50. "Ljava/util/List<",
  51. "Lokhttp3/ConnectionSpec;",
  52. ">;",
  53. "Ljava/net/ProxySelector;",
  54. ")V"
  55. }
  56. .end annotation
  57. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  58. new-instance v0, Lokhttp3/HttpUrl$Builder;
  59. invoke-direct {v0}, Lokhttp3/HttpUrl$Builder;-><init>()V
  60. if-eqz p5, :cond_0
  61. const-string v1, "https"
  62. goto :goto_0
  63. :cond_0
  64. const-string v1, "http"
  65. :goto_0
  66. invoke-virtual {v0, v1}, Lokhttp3/HttpUrl$Builder;->scheme(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  67. move-result-object v0
  68. invoke-virtual {v0, p1}, Lokhttp3/HttpUrl$Builder;->host(Ljava/lang/String;)Lokhttp3/HttpUrl$Builder;
  69. move-result-object p1
  70. invoke-virtual {p1, p2}, Lokhttp3/HttpUrl$Builder;->port(I)Lokhttp3/HttpUrl$Builder;
  71. move-result-object p1
  72. invoke-virtual {p1}, Lokhttp3/HttpUrl$Builder;->build()Lokhttp3/HttpUrl;
  73. move-result-object p1
  74. iput-object p1, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  75. if-eqz p3, :cond_6
  76. iput-object p3, p0, Lokhttp3/Address;->dns:Lokhttp3/Dns;
  77. if-eqz p4, :cond_5
  78. iput-object p4, p0, Lokhttp3/Address;->socketFactory:Ljavax/net/SocketFactory;
  79. if-eqz p8, :cond_4
  80. iput-object p8, p0, Lokhttp3/Address;->proxyAuthenticator:Lokhttp3/Authenticator;
  81. if-eqz p10, :cond_3
  82. invoke-static {p10}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
  83. move-result-object p1
  84. iput-object p1, p0, Lokhttp3/Address;->protocols:Ljava/util/List;
  85. if-eqz p11, :cond_2
  86. invoke-static {p11}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
  87. move-result-object p1
  88. iput-object p1, p0, Lokhttp3/Address;->connectionSpecs:Ljava/util/List;
  89. if-eqz p12, :cond_1
  90. iput-object p12, p0, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  91. iput-object p9, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  92. iput-object p5, p0, Lokhttp3/Address;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  93. iput-object p6, p0, Lokhttp3/Address;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  94. iput-object p7, p0, Lokhttp3/Address;->certificatePinner:Lokhttp3/CertificatePinner;
  95. return-void
  96. :cond_1
  97. new-instance p1, Ljava/lang/NullPointerException;
  98. const-string p2, "proxySelector == null"
  99. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  100. throw p1
  101. :cond_2
  102. new-instance p1, Ljava/lang/NullPointerException;
  103. const-string p2, "connectionSpecs == null"
  104. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  105. throw p1
  106. :cond_3
  107. new-instance p1, Ljava/lang/NullPointerException;
  108. const-string p2, "protocols == null"
  109. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  110. throw p1
  111. :cond_4
  112. new-instance p1, Ljava/lang/NullPointerException;
  113. const-string p2, "proxyAuthenticator == null"
  114. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  115. throw p1
  116. :cond_5
  117. new-instance p1, Ljava/lang/NullPointerException;
  118. const-string p2, "socketFactory == null"
  119. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  120. throw p1
  121. :cond_6
  122. new-instance p1, Ljava/lang/NullPointerException;
  123. const-string p2, "dns == null"
  124. invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  125. throw p1
  126. .end method
  127. # virtual methods
  128. .method public certificatePinner()Lokhttp3/CertificatePinner;
  129. .locals 1
  130. iget-object v0, p0, Lokhttp3/Address;->certificatePinner:Lokhttp3/CertificatePinner;
  131. return-object v0
  132. .end method
  133. .method public connectionSpecs()Ljava/util/List;
  134. .locals 1
  135. .annotation system Ldalvik/annotation/Signature;
  136. value = {
  137. "()",
  138. "Ljava/util/List<",
  139. "Lokhttp3/ConnectionSpec;",
  140. ">;"
  141. }
  142. .end annotation
  143. iget-object v0, p0, Lokhttp3/Address;->connectionSpecs:Ljava/util/List;
  144. return-object v0
  145. .end method
  146. .method public dns()Lokhttp3/Dns;
  147. .locals 1
  148. iget-object v0, p0, Lokhttp3/Address;->dns:Lokhttp3/Dns;
  149. return-object v0
  150. .end method
  151. .method public equals(Ljava/lang/Object;)Z
  152. .locals 2
  153. instance-of v0, p1, Lokhttp3/Address;
  154. if-eqz v0, :cond_0
  155. iget-object v0, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  156. check-cast p1, Lokhttp3/Address;
  157. iget-object v1, p1, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  158. invoke-virtual {v0, v1}, Lokhttp3/HttpUrl;->equals(Ljava/lang/Object;)Z
  159. move-result v0
  160. if-eqz v0, :cond_0
  161. invoke-virtual {p0, p1}, Lokhttp3/Address;->equalsNonHost(Lokhttp3/Address;)Z
  162. move-result p1
  163. if-eqz p1, :cond_0
  164. const/4 p1, 0x1
  165. goto :goto_0
  166. :cond_0
  167. const/4 p1, 0x0
  168. :goto_0
  169. return p1
  170. .end method
  171. .method equalsNonHost(Lokhttp3/Address;)Z
  172. .locals 2
  173. iget-object v0, p0, Lokhttp3/Address;->dns:Lokhttp3/Dns;
  174. iget-object v1, p1, Lokhttp3/Address;->dns:Lokhttp3/Dns;
  175. invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
  176. move-result v0
  177. if-eqz v0, :cond_0
  178. iget-object v0, p0, Lokhttp3/Address;->proxyAuthenticator:Lokhttp3/Authenticator;
  179. iget-object v1, p1, Lokhttp3/Address;->proxyAuthenticator:Lokhttp3/Authenticator;
  180. invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
  181. move-result v0
  182. if-eqz v0, :cond_0
  183. iget-object v0, p0, Lokhttp3/Address;->protocols:Ljava/util/List;
  184. iget-object v1, p1, Lokhttp3/Address;->protocols:Ljava/util/List;
  185. invoke-interface {v0, v1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
  186. move-result v0
  187. if-eqz v0, :cond_0
  188. iget-object v0, p0, Lokhttp3/Address;->connectionSpecs:Ljava/util/List;
  189. iget-object v1, p1, Lokhttp3/Address;->connectionSpecs:Ljava/util/List;
  190. invoke-interface {v0, v1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
  191. move-result v0
  192. if-eqz v0, :cond_0
  193. iget-object v0, p0, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  194. iget-object v1, p1, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  195. invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
  196. move-result v0
  197. if-eqz v0, :cond_0
  198. iget-object v0, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  199. iget-object v1, p1, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  200. invoke-static {v0, v1}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  201. move-result v0
  202. if-eqz v0, :cond_0
  203. iget-object v0, p0, Lokhttp3/Address;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  204. iget-object v1, p1, Lokhttp3/Address;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  205. invoke-static {v0, v1}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  206. move-result v0
  207. if-eqz v0, :cond_0
  208. iget-object v0, p0, Lokhttp3/Address;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  209. iget-object v1, p1, Lokhttp3/Address;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  210. invoke-static {v0, v1}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  211. move-result v0
  212. if-eqz v0, :cond_0
  213. iget-object v0, p0, Lokhttp3/Address;->certificatePinner:Lokhttp3/CertificatePinner;
  214. iget-object v1, p1, Lokhttp3/Address;->certificatePinner:Lokhttp3/CertificatePinner;
  215. invoke-static {v0, v1}, Lokhttp3/internal/Util;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z
  216. move-result v0
  217. if-eqz v0, :cond_0
  218. invoke-virtual {p0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
  219. move-result-object v0
  220. invoke-virtual {v0}, Lokhttp3/HttpUrl;->port()I
  221. move-result v0
  222. invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
  223. move-result-object p1
  224. invoke-virtual {p1}, Lokhttp3/HttpUrl;->port()I
  225. move-result p1
  226. if-ne v0, p1, :cond_0
  227. const/4 p1, 0x1
  228. goto :goto_0
  229. :cond_0
  230. const/4 p1, 0x0
  231. :goto_0
  232. return p1
  233. .end method
  234. .method public hashCode()I
  235. .locals 3
  236. iget-object v0, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  237. invoke-virtual {v0}, Lokhttp3/HttpUrl;->hashCode()I
  238. move-result v0
  239. const/16 v1, 0x20f
  240. add-int/2addr v1, v0
  241. mul-int/lit8 v1, v1, 0x1f
  242. iget-object v0, p0, Lokhttp3/Address;->dns:Lokhttp3/Dns;
  243. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  244. move-result v0
  245. add-int/2addr v1, v0
  246. mul-int/lit8 v1, v1, 0x1f
  247. iget-object v0, p0, Lokhttp3/Address;->proxyAuthenticator:Lokhttp3/Authenticator;
  248. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  249. move-result v0
  250. add-int/2addr v1, v0
  251. mul-int/lit8 v1, v1, 0x1f
  252. iget-object v0, p0, Lokhttp3/Address;->protocols:Ljava/util/List;
  253. invoke-interface {v0}, Ljava/util/List;->hashCode()I
  254. move-result v0
  255. add-int/2addr v1, v0
  256. mul-int/lit8 v1, v1, 0x1f
  257. iget-object v0, p0, Lokhttp3/Address;->connectionSpecs:Ljava/util/List;
  258. invoke-interface {v0}, Ljava/util/List;->hashCode()I
  259. move-result v0
  260. add-int/2addr v1, v0
  261. mul-int/lit8 v1, v1, 0x1f
  262. iget-object v0, p0, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  263. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  264. move-result v0
  265. add-int/2addr v1, v0
  266. mul-int/lit8 v1, v1, 0x1f
  267. iget-object v0, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  268. const/4 v2, 0x0
  269. if-eqz v0, :cond_0
  270. invoke-virtual {v0}, Ljava/net/Proxy;->hashCode()I
  271. move-result v0
  272. goto :goto_0
  273. :cond_0
  274. const/4 v0, 0x0
  275. :goto_0
  276. add-int/2addr v1, v0
  277. mul-int/lit8 v1, v1, 0x1f
  278. iget-object v0, p0, Lokhttp3/Address;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  279. if-eqz v0, :cond_1
  280. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  281. move-result v0
  282. goto :goto_1
  283. :cond_1
  284. const/4 v0, 0x0
  285. :goto_1
  286. add-int/2addr v1, v0
  287. mul-int/lit8 v1, v1, 0x1f
  288. iget-object v0, p0, Lokhttp3/Address;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  289. if-eqz v0, :cond_2
  290. invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
  291. move-result v0
  292. goto :goto_2
  293. :cond_2
  294. const/4 v0, 0x0
  295. :goto_2
  296. add-int/2addr v1, v0
  297. mul-int/lit8 v1, v1, 0x1f
  298. iget-object v0, p0, Lokhttp3/Address;->certificatePinner:Lokhttp3/CertificatePinner;
  299. if-eqz v0, :cond_3
  300. invoke-virtual {v0}, Lokhttp3/CertificatePinner;->hashCode()I
  301. move-result v2
  302. :cond_3
  303. add-int/2addr v1, v2
  304. return v1
  305. .end method
  306. .method public hostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
  307. .locals 1
  308. iget-object v0, p0, Lokhttp3/Address;->hostnameVerifier:Ljavax/net/ssl/HostnameVerifier;
  309. return-object v0
  310. .end method
  311. .method public protocols()Ljava/util/List;
  312. .locals 1
  313. .annotation system Ldalvik/annotation/Signature;
  314. value = {
  315. "()",
  316. "Ljava/util/List<",
  317. "Lokhttp3/Protocol;",
  318. ">;"
  319. }
  320. .end annotation
  321. iget-object v0, p0, Lokhttp3/Address;->protocols:Ljava/util/List;
  322. return-object v0
  323. .end method
  324. .method public proxy()Ljava/net/Proxy;
  325. .locals 1
  326. iget-object v0, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  327. return-object v0
  328. .end method
  329. .method public proxyAuthenticator()Lokhttp3/Authenticator;
  330. .locals 1
  331. iget-object v0, p0, Lokhttp3/Address;->proxyAuthenticator:Lokhttp3/Authenticator;
  332. return-object v0
  333. .end method
  334. .method public proxySelector()Ljava/net/ProxySelector;
  335. .locals 1
  336. iget-object v0, p0, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  337. return-object v0
  338. .end method
  339. .method public socketFactory()Ljavax/net/SocketFactory;
  340. .locals 1
  341. iget-object v0, p0, Lokhttp3/Address;->socketFactory:Ljavax/net/SocketFactory;
  342. return-object v0
  343. .end method
  344. .method public sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
  345. .locals 1
  346. iget-object v0, p0, Lokhttp3/Address;->sslSocketFactory:Ljavax/net/ssl/SSLSocketFactory;
  347. return-object v0
  348. .end method
  349. .method public toString()Ljava/lang/String;
  350. .locals 2
  351. new-instance v0, Ljava/lang/StringBuilder;
  352. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  353. const-string v1, "Address{"
  354. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  355. iget-object v1, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  356. invoke-virtual {v1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
  357. move-result-object v1
  358. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  359. const-string v1, ":"
  360. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  361. iget-object v1, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  362. invoke-virtual {v1}, Lokhttp3/HttpUrl;->port()I
  363. move-result v1
  364. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
  365. iget-object v1, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  366. if-eqz v1, :cond_0
  367. const-string v1, ", proxy="
  368. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  369. iget-object v1, p0, Lokhttp3/Address;->proxy:Ljava/net/Proxy;
  370. goto :goto_0
  371. :cond_0
  372. const-string v1, ", proxySelector="
  373. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  374. iget-object v1, p0, Lokhttp3/Address;->proxySelector:Ljava/net/ProxySelector;
  375. :goto_0
  376. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  377. const-string v1, "}"
  378. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  379. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  380. move-result-object v0
  381. return-object v0
  382. .end method
  383. .method public url()Lokhttp3/HttpUrl;
  384. .locals 1
  385. iget-object v0, p0, Lokhttp3/Address;->url:Lokhttp3/HttpUrl;
  386. return-object v0
  387. .end method