123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- .class public final Lokhttp3/ConnectionSpec$Builder;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/ConnectionSpec;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x19
- name = "Builder"
- .end annotation
- # instance fields
- .field cipherSuites:[Ljava/lang/String;
- .field supportsTlsExtensions:Z
- .field tls:Z
- .field tlsVersions:[Ljava/lang/String;
- # direct methods
- .method public constructor <init>(Lokhttp3/ConnectionSpec;)V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iget-boolean v0, p1, Lokhttp3/ConnectionSpec;->tls:Z
- iput-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- iget-object v0, p1, Lokhttp3/ConnectionSpec;->cipherSuites:[Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/ConnectionSpec;->tlsVersions:[Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
- iget-boolean p1, p1, Lokhttp3/ConnectionSpec;->supportsTlsExtensions:Z
- iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
- return-void
- .end method
- .method constructor <init>(Z)V
- .locals 0
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- return-void
- .end method
- # virtual methods
- .method public allEnabledCipherSuites()Lokhttp3/ConnectionSpec$Builder;
- .locals 2
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_0
- const/4 v0, 0x0
- iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "no cipher suites for cleartext connections"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public allEnabledTlsVersions()Lokhttp3/ConnectionSpec$Builder;
- .locals 2
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_0
- const/4 v0, 0x0
- iput-object v0, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "no TLS versions for cleartext connections"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public build()Lokhttp3/ConnectionSpec;
- .locals 1
- new-instance v0, Lokhttp3/ConnectionSpec;
- invoke-direct {v0, p0}, Lokhttp3/ConnectionSpec;-><init>(Lokhttp3/ConnectionSpec$Builder;)V
- return-object v0
- .end method
- .method public varargs cipherSuites([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
- .locals 1
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_1
- array-length v0, p1
- if-eqz v0, :cond_0
- invoke-virtual {p1}, [Ljava/lang/String;->clone()Ljava/lang/Object;
- move-result-object p1
- check-cast p1, [Ljava/lang/String;
- iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->cipherSuites:[Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "At least one cipher suite is required"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "no cipher suites for cleartext connections"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public varargs cipherSuites([Lokhttp3/CipherSuite;)Lokhttp3/ConnectionSpec$Builder;
- .locals 3
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_1
- array-length v0, p1
- new-array v0, v0, [Ljava/lang/String;
- const/4 v1, 0x0
- :goto_0
- array-length v2, p1
- if-ge v1, v2, :cond_0
- aget-object v2, p1, v1
- iget-object v2, v2, Lokhttp3/CipherSuite;->javaName:Ljava/lang/String;
- aput-object v2, v0, v1
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_0
- invoke-virtual {p0, v0}, Lokhttp3/ConnectionSpec$Builder;->cipherSuites([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
- move-result-object p1
- return-object p1
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "no cipher suites for cleartext connections"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method public supportsTlsExtensions(Z)Lokhttp3/ConnectionSpec$Builder;
- .locals 1
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_0
- iput-boolean p1, p0, Lokhttp3/ConnectionSpec$Builder;->supportsTlsExtensions:Z
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "no TLS extensions for cleartext connections"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public varargs tlsVersions([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
- .locals 1
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_1
- array-length v0, p1
- if-eqz v0, :cond_0
- invoke-virtual {p1}, [Ljava/lang/String;->clone()Ljava/lang/Object;
- move-result-object p1
- check-cast p1, [Ljava/lang/String;
- iput-object p1, p0, Lokhttp3/ConnectionSpec$Builder;->tlsVersions:[Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "At least one TLS version is required"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "no TLS versions for cleartext connections"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public varargs tlsVersions([Lokhttp3/TlsVersion;)Lokhttp3/ConnectionSpec$Builder;
- .locals 3
- iget-boolean v0, p0, Lokhttp3/ConnectionSpec$Builder;->tls:Z
- if-eqz v0, :cond_1
- array-length v0, p1
- new-array v0, v0, [Ljava/lang/String;
- const/4 v1, 0x0
- :goto_0
- array-length v2, p1
- if-ge v1, v2, :cond_0
- aget-object v2, p1, v1
- iget-object v2, v2, Lokhttp3/TlsVersion;->javaName:Ljava/lang/String;
- aput-object v2, v0, v1
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_0
- invoke-virtual {p0, v0}, Lokhttp3/ConnectionSpec$Builder;->tlsVersions([Ljava/lang/String;)Lokhttp3/ConnectionSpec$Builder;
- move-result-object p1
- return-object p1
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "no TLS versions for cleartext connections"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
|