apkfuckery/com.discord/smali/androidx/lifecycle/ViewModelProvider$NewInstanceFactory.smali

98 lines
2.5 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public Landroidx/lifecycle/ViewModelProvider$NewInstanceFactory;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "ViewModelProvider.java"
2019-02-04 20:08:30 +00:00
# interfaces
.implements Landroidx/lifecycle/ViewModelProvider$Factory;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/lifecycle/ViewModelProvider;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "NewInstanceFactory"
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public create(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
.locals 3
.param p1 # Ljava/lang/Class;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Landroidx/lifecycle/ViewModel;",
">(",
"Ljava/lang/Class<",
"TT;>;)TT;"
}
.end annotation
2019-05-03 18:53:54 +00:00
const-string v0, "Cannot create an instance of "
2019-02-04 20:08:30 +00:00
:try_start_0
invoke-virtual {p1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
2019-05-03 18:53:54 +00:00
move-result-object v1
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
check-cast v1, Landroidx/lifecycle/ViewModel;
2019-02-04 20:08:30 +00:00
:try_end_0
.catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
2019-05-03 18:53:54 +00:00
return-object v1
2019-02-04 20:08:30 +00:00
:catch_0
2019-05-03 18:53:54 +00:00
move-exception v1
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
new-instance v2, Ljava/lang/RuntimeException;
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
2019-05-03 18:53:54 +00:00
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-05-03 18:53:54 +00:00
invoke-direct {v2, p1, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
throw v2
2019-02-04 20:08:30 +00:00
:catch_1
2019-05-03 18:53:54 +00:00
move-exception v1
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
new-instance v2, Ljava/lang/RuntimeException;
2019-02-04 20:08:30 +00:00
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
2019-05-03 18:53:54 +00:00
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-05-03 18:53:54 +00:00
invoke-direct {v2, p1, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
throw v2
2019-02-04 20:08:30 +00:00
.end method