123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- .class Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Ljava/lang/reflect/InvocationHandler;
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/internal/platform/JdkWithJettyBootPlatform;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0xa
- name = "JettyNegoProvider"
- .end annotation
- # instance fields
- .field private final protocols:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- .end field
- .field selected:Ljava/lang/String;
- .field unsupported:Z
- # direct methods
- .method constructor <init>(Ljava/util/List;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->protocols:Ljava/util/List;
- return-void
- .end method
- # virtual methods
- .method public invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;
- .locals 5
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/lang/Throwable;
- }
- .end annotation
- invoke-virtual {p2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
- move-result-object p1
- invoke-virtual {p2}, Ljava/lang/reflect/Method;->getReturnType()Ljava/lang/Class;
- move-result-object v0
- if-nez p3, :cond_0
- sget-object p3, Lokhttp3/internal/Util;->EMPTY_STRING_ARRAY:[Ljava/lang/String;
- :cond_0
- const-string v1, "supports"
- invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v1
- const/4 v2, 0x1
- if-eqz v1, :cond_1
- sget-object v1, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
- if-ne v1, v0, :cond_1
- invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
- move-result-object p1
- return-object p1
- :cond_1
- const-string v1, "unsupported"
- invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v1
- const/4 v3, 0x0
- if-eqz v1, :cond_2
- sget-object v1, Ljava/lang/Void;->TYPE:Ljava/lang/Class;
- if-ne v1, v0, :cond_2
- iput-boolean v2, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->unsupported:Z
- return-object v3
- :cond_2
- const-string v1, "protocols"
- invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v1
- if-eqz v1, :cond_3
- array-length v1, p3
- if-nez v1, :cond_3
- iget-object p1, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->protocols:Ljava/util/List;
- return-object p1
- :cond_3
- const-string v1, "selectProtocol"
- invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v1
- const/4 v4, 0x0
- if-nez v1, :cond_4
- const-string v1, "select"
- invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v1
- if-eqz v1, :cond_7
- :cond_4
- const-class v1, Ljava/lang/String;
- if-ne v1, v0, :cond_7
- array-length v0, p3
- if-ne v0, v2, :cond_7
- aget-object v0, p3, v4
- instance-of v0, v0, Ljava/util/List;
- if-eqz v0, :cond_7
- aget-object p1, p3, v4
- check-cast p1, Ljava/util/List;
- invoke-interface {p1}, Ljava/util/List;->size()I
- move-result p2
- const/4 p3, 0x0
- :goto_0
- if-ge p3, p2, :cond_6
- iget-object v0, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->protocols:Ljava/util/List;
- invoke-interface {p1, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_5
- invoke-interface {p1, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- :goto_1
- check-cast p1, Ljava/lang/String;
- iput-object p1, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->selected:Ljava/lang/String;
- return-object p1
- :cond_5
- add-int/lit8 p3, p3, 0x1
- goto :goto_0
- :cond_6
- iget-object p1, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->protocols:Ljava/util/List;
- invoke-interface {p1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object p1
- goto :goto_1
- :cond_7
- const-string v0, "protocolSelected"
- invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-nez v0, :cond_8
- const-string v0, "selected"
- invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result p1
- if-eqz p1, :cond_9
- :cond_8
- array-length p1, p3
- if-ne p1, v2, :cond_9
- aget-object p1, p3, v4
- check-cast p1, Ljava/lang/String;
- iput-object p1, p0, Lokhttp3/internal/platform/JdkWithJettyBootPlatform$JettyNegoProvider;->selected:Ljava/lang/String;
- return-object v3
- :cond_9
- invoke-virtual {p2, p0, p3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- return-object p1
- .end method
|