SynchronizedLazyImpl.smali
.class final Lkotlin/SynchronizedLazyImpl;
.super Ljava/lang/Object;
# 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 private f:Lkotlin/jvm/functions/Function0;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function0<",
"+TT;>;"
}
.end annotation
.end field
.field private volatile g:Ljava/lang/Object;
.field private final h:Ljava/lang/Object;
# direct methods
.method public constructor <init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function0<",
"+TT;>;",
"Ljava/lang/Object;",
")V"
}
.end annotation
const-string v0, "initializer"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lkotlin/SynchronizedLazyImpl;->f:Lkotlin/jvm/functions/Function0;
sget-object p1, Lkotlin/UNINITIALIZED_VALUE;->a:Lkotlin/UNINITIALIZED_VALUE;
iput-object p1, p0, Lkotlin/SynchronizedLazyImpl;->g:Ljava/lang/Object;
if-eqz p2, :cond_11
goto :goto_12
:cond_11
move-object p2, p0
:goto_12
iput-object p2, p0, Lkotlin/SynchronizedLazyImpl;->h:Ljava/lang/Object;
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
.registers 5
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_5
const/4 p2, 0x0
:cond_5
invoke-direct {p0, p1, p2}, Lkotlin/SynchronizedLazyImpl;-><init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public a()Z
.registers 3
iget-object v0, p0, Lkotlin/SynchronizedLazyImpl;->g:Ljava/lang/Object;
sget-object v1, Lkotlin/UNINITIALIZED_VALUE;->a:Lkotlin/UNINITIALIZED_VALUE;
if-eq v0, v1, :cond_8
const/4 v0, 0x1
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
return v0
.end method
.method public getValue()Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
iget-object v0, p0, Lkotlin/SynchronizedLazyImpl;->g:Ljava/lang/Object;
sget-object v1, Lkotlin/UNINITIALIZED_VALUE;->a:Lkotlin/UNINITIALIZED_VALUE;
if-eq v0, v1, :cond_7
return-object v0
:cond_7
iget-object v0, p0, Lkotlin/SynchronizedLazyImpl;->h:Ljava/lang/Object;
monitor-enter v0
:try_start_a
iget-object v1, p0, Lkotlin/SynchronizedLazyImpl;->g:Ljava/lang/Object;
sget-object v2, Lkotlin/UNINITIALIZED_VALUE;->a:Lkotlin/UNINITIALIZED_VALUE;
if-eq v1, v2, :cond_11
goto :goto_1e
:cond_11
iget-object v1, p0, Lkotlin/SynchronizedLazyImpl;->f:Lkotlin/jvm/functions/Function0;
const/4 v2, 0x0
if-eqz v1, :cond_20
invoke-interface {v1}, Lkotlin/jvm/functions/Function0;->c()Ljava/lang/Object;
move-result-object v1
iput-object v1, p0, Lkotlin/SynchronizedLazyImpl;->g:Ljava/lang/Object;
iput-object v2, p0, Lkotlin/SynchronizedLazyImpl;->f:Lkotlin/jvm/functions/Function0;
:try_end_1e
.catchall {:try_start_a .. :try_end_1e} :catchall_24
:goto_1e
monitor-exit v0
return-object v1
:cond_20
:try_start_20
invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V
:try_end_23
.catchall {:try_start_20 .. :try_end_23} :catchall_24
throw v2
:catchall_24
move-exception v1
monitor-exit v0
throw v1
.end method
.method public toString()Ljava/lang/String;
.registers 2
invoke-virtual {p0}, Lkotlin/SynchronizedLazyImpl;->a()Z
move-result v0
if-eqz v0, :cond_f
invoke-virtual {p0}, Lkotlin/SynchronizedLazyImpl;->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_11
:cond_f
const-string v0, "Lazy value not initialized yet."
:goto_11
return-object v0
.end method