CloseGuard.smali
.class public final Lokhttp3/internal/platform/android/CloseGuard;
.super Ljava/lang/Object;
.source "CloseGuard.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/platform/android/CloseGuard$Companion;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0003\u0008\u0000\u0018\u0000 \r2\u00020\u0001:\u0001\rB#\u0012\u0008\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0008\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\u0008\u0010\u0005\u001a\u0004\u0018\u00010\u0003\u00a2\u0006\u0002\u0010\u0006J\u0010\u0010\u0007\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0008\u001a\u00020\tJ\u0010\u0010\n\u001a\u00020\u000b2\u0008\u0010\u000c\u001a\u0004\u0018\u00010\u0001R\u0010\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u000e"
}
d2 = {
"Lokhttp3/internal/platform/android/CloseGuard;",
"",
"getMethod",
"Ljava/lang/reflect/Method;",
"openMethod",
"warnIfOpenMethod",
"(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V",
"createAndOpen",
"closer",
"",
"warnIfOpen",
"",
"closeGuardInstance",
"Companion",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x1,
0x10
}
.end annotation
# static fields
.field public static final Companion:Lokhttp3/internal/platform/android/CloseGuard$Companion;
# 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 static constructor <clinit>()V
.registers 2
new-instance v0, Lokhttp3/internal/platform/android/CloseGuard$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/internal/platform/android/CloseGuard$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/internal/platform/android/CloseGuard;->Companion:Lokhttp3/internal/platform/android/CloseGuard$Companion;
return-void
.end method
.method public constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V
.registers 4
.line 25
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/platform/android/CloseGuard;->getMethod:Ljava/lang/reflect/Method;
iput-object p2, p0, Lokhttp3/internal/platform/android/CloseGuard;->openMethod:Ljava/lang/reflect/Method;
iput-object p3, p0, Lokhttp3/internal/platform/android/CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
return-void
.end method
# virtual methods
.method public final createAndOpen(Ljava/lang/String;)Ljava/lang/Object;
.registers 7
const-string v0, "closer"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 32
iget-object v0, p0, Lokhttp3/internal/platform/android/CloseGuard;->getMethod:Ljava/lang/reflect/Method;
const/4 v1, 0x0
if-eqz v0, :cond_21
const/4 v2, 0x0
:try_start_b
new-array v3, v2, [Ljava/lang/Object;
.line 34
invoke-virtual {v0, v1, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
.line 35
iget-object v3, p0, Lokhttp3/internal/platform/android/CloseGuard;->openMethod:Ljava/lang/reflect/Method;
if-nez v3, :cond_18
invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V
:cond_18
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_20
.catch Ljava/lang/Exception; {:try_start_b .. :try_end_20} :catch_21
return-object v0
:catch_21
:cond_21
return-object v1
.end method
.method public final warnIfOpen(Ljava/lang/Object;)Z
.registers 5
const/4 v0, 0x0
if-eqz p1, :cond_10
.line 47
:try_start_3
iget-object v1, p0, Lokhttp3/internal/platform/android/CloseGuard;->warnIfOpenMethod:Ljava/lang/reflect/Method;
if-nez v1, :cond_a
invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V
:cond_a
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_f
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_f} :catch_10
const/4 v0, 0x1
:catch_10
:cond_10
return v0
.end method