apkfuckery/com.discord/smali/androidx/lifecycle/ViewModelLazy.smali
2020-07-08 16:44:49 +00:00

200 lines
5.1 KiB
Smali

.class public final Landroidx/lifecycle/ViewModelLazy;
.super Ljava/lang/Object;
.source "ViewModelProvider.kt"
# interfaces
.implements Lkotlin/Lazy;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<VM:",
"Landroidx/lifecycle/ViewModel;",
">",
"Ljava/lang/Object;",
"Lkotlin/Lazy<",
"TVM;>;"
}
.end annotation
# instance fields
.field public cached:Landroidx/lifecycle/ViewModel;
.annotation system Ldalvik/annotation/Signature;
value = {
"TVM;"
}
.end annotation
.end field
.field public final factoryProducer:Lkotlin/jvm/functions/Function0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function0<",
"Landroidx/lifecycle/ViewModelProvider$Factory;",
">;"
}
.end annotation
.end field
.field public final storeProducer:Lkotlin/jvm/functions/Function0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function0<",
"Landroidx/lifecycle/ViewModelStore;",
">;"
}
.end annotation
.end field
.field public final viewModelClass:Lj0/r/b;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lj0/r/b<",
"TVM;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lj0/r/b;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lj0/r/b<",
"TVM;>;",
"Lkotlin/jvm/functions/Function0<",
"+",
"Landroidx/lifecycle/ViewModelStore;",
">;",
"Lkotlin/jvm/functions/Function0<",
"+",
"Landroidx/lifecycle/ViewModelProvider$Factory;",
">;)V"
}
.end annotation
const/4 v0, 0x0
if-eqz p1, :cond_2
if-eqz p2, :cond_1
if-eqz p3, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/lifecycle/ViewModelLazy;->viewModelClass:Lj0/r/b;
iput-object p2, p0, Landroidx/lifecycle/ViewModelLazy;->storeProducer:Lkotlin/jvm/functions/Function0;
iput-object p3, p0, Landroidx/lifecycle/ViewModelLazy;->factoryProducer:Lkotlin/jvm/functions/Function0;
return-void
:cond_0
const-string p1, "factoryProducer"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "storeProducer"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
:cond_2
const-string p1, "viewModelClass"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public getValue()Landroidx/lifecycle/ViewModel;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()TVM;"
}
.end annotation
iget-object v0, p0, Landroidx/lifecycle/ViewModelLazy;->cached:Landroidx/lifecycle/ViewModel;
if-nez v0, :cond_0
iget-object v0, p0, Landroidx/lifecycle/ViewModelLazy;->factoryProducer:Lkotlin/jvm/functions/Function0;
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/lifecycle/ViewModelProvider$Factory;
iget-object v1, p0, Landroidx/lifecycle/ViewModelLazy;->storeProducer:Lkotlin/jvm/functions/Function0;
invoke-interface {v1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroidx/lifecycle/ViewModelStore;
new-instance v2, Landroidx/lifecycle/ViewModelProvider;
invoke-direct {v2, v1, v0}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStore;Landroidx/lifecycle/ViewModelProvider$Factory;)V
iget-object v0, p0, Landroidx/lifecycle/ViewModelLazy;->viewModelClass:Lj0/r/b;
invoke-static {v0}, Lj0/i/u;->getJavaClass(Lj0/r/b;)Ljava/lang/Class;
move-result-object v0
invoke-virtual {v2, v0}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
move-result-object v0
iput-object v0, p0, Landroidx/lifecycle/ViewModelLazy;->cached:Landroidx/lifecycle/ViewModel;
const-string v1, "ViewModelProvider(store,\u2026ed = it\n }"
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
:cond_0
return-object v0
.end method
.method public bridge synthetic getValue()Ljava/lang/Object;
.locals 1
invoke-virtual {p0}, Landroidx/lifecycle/ViewModelLazy;->getValue()Landroidx/lifecycle/ViewModel;
move-result-object v0
return-object v0
.end method
.method public isInitialized()Z
.locals 1
iget-object v0, p0, Landroidx/lifecycle/ViewModelLazy;->cached:Landroidx/lifecycle/ViewModel;
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method