123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- .class final Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/internal/platform/AndroidPlatform;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x18
- name = "CloseGuard"
- .end annotation
- # instance fields
- .field private final getMethod:Ljava/lang/reflect/Method;
- .field private final openMethod:Ljava/lang/reflect/Method;
- .field private final warnIfOpenMethod:Ljava/lang/reflect/Method;
- # direct methods
- .method constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
- .locals 0
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
- iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
- iput-object p3, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
- return-void
- .end method
- .method static get()Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
- .locals 7
- const-string v0, "dalvik.system.CloseGuard"
- const/4 v1, 0x0
- :try_start_0
- invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
- move-result-object v0
- const-string v2, "get"
- const/4 v3, 0x0
- new-array v4, v3, [Ljava/lang/Class;
- invoke-virtual {v0, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
- move-result-object v2
- const-string v4, "open"
- const/4 v5, 0x1
- new-array v5, v5, [Ljava/lang/Class;
- const-class v6, Ljava/lang/String;
- aput-object v6, v5, v3
- invoke-virtual {v0, v4, v5}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
- move-result-object v4
- const-string v5, "warnIfOpen"
- new-array v3, v3, [Ljava/lang/Class;
- invoke-virtual {v0, v5, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
- move-result-object v1
- :try_end_0
- .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
- move-object v0, v1
- move-object v1, v2
- goto :goto_0
- :catch_0
- move-object v0, v1
- move-object v4, v0
- :goto_0
- new-instance v2, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;
- invoke-direct {v2, v1, v4, v0}, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;-><init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
- return-object v2
- .end method
- # virtual methods
- .method createAndOpen(Ljava/lang/String;)Ljava/lang/Object;
- .locals 5
- iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->getMethod:Ljava/lang/reflect/Method;
- const/4 v1, 0x0
- if-eqz v0, :cond_0
- const/4 v2, 0x0
- :try_start_0
- new-array v3, v2, [Ljava/lang/Object;
- invoke-virtual {v0, v1, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v0
- iget-object v3, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->openMethod:Ljava/lang/reflect/Method;
- const/4 v4, 0x1
- new-array v4, v4, [Ljava/lang/Object;
- aput-object p1, v4, v2
- invoke-virtual {v3, v0, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- :try_end_0
- .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
- return-object v0
- :catch_0
- :cond_0
- return-object v1
- .end method
- .method warnIfOpen(Ljava/lang/Object;)Z
- .locals 3
- const/4 v0, 0x0
- if-eqz p1, :cond_0
- :try_start_0
- iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
- new-array v2, v0, [Ljava/lang/Object;
- invoke-virtual {v1, p1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
- :try_end_0
- .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
- const/4 v0, 0x1
- :catch_0
- :cond_0
- return v0
- .end method
|