210 lines
3.9 KiB
Smali
210 lines
3.9 KiB
Smali
.class public final Lz/k;
|
|
.super Ljava/lang/Object;
|
|
.source "LazyJVM.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/Lazy;
|
|
.implements Ljava/io/Serializable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lkotlin/Lazy<",
|
|
"TT;>;",
|
|
"Ljava/io/Serializable;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public volatile _value:Ljava/lang/Object;
|
|
|
|
.field public initializer:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"+TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final lock:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;I)V
|
|
.locals 1
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
move-object p2, v0
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lz/k;->initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
sget-object p1, Lz/m;->a:Lz/m;
|
|
|
|
iput-object p1, p0, Lz/k;->_value:Ljava/lang/Object;
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object p2, p0
|
|
|
|
:goto_0
|
|
iput-object p2, p0, Lz/k;->lock:Ljava/lang/Object;
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p1, "initializer"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final writeReplace()Ljava/lang/Object;
|
|
.locals 2
|
|
|
|
new-instance v0, Lz/b;
|
|
|
|
invoke-virtual {p0}, Lz/k;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lz/b;-><init>(Ljava/lang/Object;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getValue()Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lz/k;->_value:Ljava/lang/Object;
|
|
|
|
sget-object v1, Lz/m;->a:Lz/m;
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lz/k;->lock:Ljava/lang/Object;
|
|
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lz/k;->_value:Ljava/lang/Object;
|
|
|
|
sget-object v2, Lz/m;->a:Lz/m;
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lz/k;->initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lz/k;->_value:Ljava/lang/Object;
|
|
|
|
iput-object v2, p0, Lz/k;->initializer:Lkotlin/jvm/functions/Function0;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
:try_start_1
|
|
invoke-static {}, Lz/u/b/j;->throwNpe()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v2
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public isInitialized()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lz/k;->_value:Ljava/lang/Object;
|
|
|
|
sget-object v1, Lz/m;->a:Lz/m;
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lz/k;->isInitialized()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Lz/k;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "Lazy value not initialized yet."
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|