402 lines
9.9 KiB
Smali
402 lines
9.9 KiB
Smali
.class final Lokhttp3/internal/g/e;
|
|
.super Ljava/lang/Object;
|
|
.source "OptionalMethod.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final bzR:Ljava/lang/Class;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Class<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final bzS:[Ljava/lang/Class;
|
|
|
|
.field private final methodName:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method varargs constructor <init>(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;",
|
|
"Ljava/lang/String;",
|
|
"[",
|
|
"Ljava/lang/Class;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/g/e;->bzR:Ljava/lang/Class;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/g/e;->methodName:Ljava/lang/String;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/g/e;->bzS:[Ljava/lang/Class;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private R(Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;)",
|
|
"Ljava/lang/reflect/Method;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/g/e;->methodName:Ljava/lang/String;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/g/e;->bzS:[Ljava/lang/Class;
|
|
|
|
invoke-static {p1, v0, v2}, Lokhttp3/internal/g/e;->a(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/g/e;->bzR:Ljava/lang/Class;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/reflect/Method;->getReturnType()Ljava/lang/Class;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private varargs a(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;[",
|
|
"Ljava/lang/Object;",
|
|
")",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/reflect/InvocationTargetException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lokhttp3/internal/g/e;->R(Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-virtual {v0, p1, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private static a(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;",
|
|
"Ljava/lang/String;",
|
|
"[",
|
|
"Ljava/lang/Class;",
|
|
")",
|
|
"Ljava/lang/reflect/Method;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
invoke-virtual {p0, p1, p2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:try_start_1
|
|
invoke-virtual {p0}, Ljava/lang/reflect/Method;->getModifiers()I
|
|
|
|
move-result p1
|
|
:try_end_1
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
and-int/lit8 p1, p1, 0x1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
:catch_0
|
|
move-object p0, v0
|
|
|
|
:catch_1
|
|
:cond_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private varargs invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;[",
|
|
"Ljava/lang/Object;",
|
|
")",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/reflect/InvocationTargetException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lokhttp3/internal/g/e;->R(Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-virtual {v0, p1, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
new-instance p2, Ljava/lang/AssertionError;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Unexpectedly could not call: "
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/AssertionError;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p2
|
|
|
|
:cond_0
|
|
new-instance p2, Ljava/lang/AssertionError;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Method "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/g/e;->methodName:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " not supported for object "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final varargs b(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;[",
|
|
"Ljava/lang/Object;",
|
|
")",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
:try_start_0
|
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/g/e;->a(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getTargetException()Ljava/lang/Throwable;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of p2, p1, Ljava/lang/RuntimeException;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
check-cast p1, Ljava/lang/RuntimeException;
|
|
|
|
throw p1
|
|
|
|
:cond_0
|
|
new-instance p2, Ljava/lang/AssertionError;
|
|
|
|
const-string v0, "Unexpected exception"
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/AssertionError;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public final bE(Ljava/lang/Object;)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/g/e;->R(Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final varargs c(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;[",
|
|
"Ljava/lang/Object;",
|
|
")",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
:try_start_0
|
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/g/e;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getTargetException()Ljava/lang/Throwable;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of p2, p1, Ljava/lang/RuntimeException;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
check-cast p1, Ljava/lang/RuntimeException;
|
|
|
|
throw p1
|
|
|
|
:cond_0
|
|
new-instance p2, Ljava/lang/AssertionError;
|
|
|
|
const-string v0, "Unexpected exception"
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/AssertionError;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw p2
|
|
.end method
|