tmap/smali_classes5/org/apache/http/util/ExceptionUtils.smali
2022-06-10 21:38:30 +09:00

145 lines
3.6 KiB
Smali

.class public final Lorg/apache/http/util/ExceptionUtils;
.super Ljava/lang/Object;
.source "ExceptionUtils.java"
# static fields
.field private static final INIT_CAUSE_METHOD:Ljava/lang/reflect/Method;
.field public static synthetic class$java$lang$Throwable:Ljava/lang/Class;
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
invoke-static {}, Lorg/apache/http/util/ExceptionUtils;->getInitCauseMethod()Ljava/lang/reflect/Method;
move-result-object v0
sput-object v0, Lorg/apache/http/util/ExceptionUtils;->INIT_CAUSE_METHOD:Ljava/lang/reflect/Method;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic class$(Ljava/lang/String;)Ljava/lang/Class;
.locals 1
.line 1
:try_start_0
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
move-result-object p0
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
new-instance v0, Ljava/lang/NoClassDefFoundError;
invoke-virtual {p0}, Ljava/lang/ClassNotFoundException;->getMessage()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/NoClassDefFoundError;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private static getInitCauseMethod()Ljava/lang/reflect/Method;
.locals 4
const/4 v0, 0x1
:try_start_0
new-array v0, v0, [Ljava/lang/Class;
const/4 v1, 0x0
.line 1
sget-object v2, Lorg/apache/http/util/ExceptionUtils;->class$java$lang$Throwable:Ljava/lang/Class;
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
const-string v3, "java.lang.Throwable"
if-nez v2, :cond_0
:try_start_1
invoke-static {v3}, Lorg/apache/http/util/ExceptionUtils;->class$(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v2
sput-object v2, Lorg/apache/http/util/ExceptionUtils;->class$java$lang$Throwable:Ljava/lang/Class;
:cond_0
aput-object v2, v0, v1
.line 2
sget-object v1, Lorg/apache/http/util/ExceptionUtils;->class$java$lang$Throwable:Ljava/lang/Class;
if-nez v1, :cond_1
invoke-static {v3}, Lorg/apache/http/util/ExceptionUtils;->class$(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v1
sput-object v1, Lorg/apache/http/util/ExceptionUtils;->class$java$lang$Throwable:Ljava/lang/Class;
:cond_1
const-string v2, "initCause"
invoke-virtual {v1, v2, v0}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v0
:try_end_1
.catch Ljava/lang/NoSuchMethodException; {:try_start_1 .. :try_end_1} :catch_0
return-object v0
:catch_0
const/4 v0, 0x0
return-object v0
.end method
.method public static initCause(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
.locals 3
.line 1
sget-object v0, Lorg/apache/http/util/ExceptionUtils;->INIT_CAUSE_METHOD:Ljava/lang/reflect/Method;
if-eqz v0, :cond_0
const/4 v1, 0x1
:try_start_0
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
aput-object p1, v1, v2
.line 2
invoke-virtual {v0, p0, v1}, 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
:catch_0
:cond_0
return-void
.end method