133 lines
3.7 KiB
Smali
133 lines
3.7 KiB
Smali
.class public abstract Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;
|
|
.super Ljava/lang/Object;
|
|
.source "AtomicSafeInitializer.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final factory:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final reference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->factory:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.line 3
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get()Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:cond_0
|
|
:goto_0
|
|
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->factory:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1, p0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->initialize()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public abstract initialize()Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
|
|
}
|
|
.end annotation
|
|
.end method
|