LambdaObserver.smali
.class public final Lio/reactivex/internal/observers/LambdaObserver;
.super Ljava/util/concurrent/atomic/AtomicReference;
# interfaces
.implements Lio/reactivex/Observer;
.implements Lio/reactivex/disposables/Disposable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lio/reactivex/disposables/Disposable;",
">;",
"Lio/reactivex/Observer<",
"TT;>;",
"Lio/reactivex/disposables/Disposable;",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field final f:Lio/reactivex/functions/Consumer;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Consumer<",
"-TT;>;"
}
.end annotation
.end field
.field final g:Lio/reactivex/functions/Consumer;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Consumer<",
"-",
"Ljava/lang/Throwable;",
">;"
}
.end annotation
.end field
.field final h:Lio/reactivex/functions/Action;
.field final i:Lio/reactivex/functions/Consumer;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Consumer<",
"-",
"Lio/reactivex/disposables/Disposable;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lio/reactivex/functions/Consumer;Lio/reactivex/functions/Consumer;Lio/reactivex/functions/Action;Lio/reactivex/functions/Consumer;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/functions/Consumer<",
"-TT;>;",
"Lio/reactivex/functions/Consumer<",
"-",
"Ljava/lang/Throwable;",
">;",
"Lio/reactivex/functions/Action;",
"Lio/reactivex/functions/Consumer<",
"-",
"Lio/reactivex/disposables/Disposable;",
">;)V"
}
.end annotation
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object p1, p0, Lio/reactivex/internal/observers/LambdaObserver;->f:Lio/reactivex/functions/Consumer;
iput-object p2, p0, Lio/reactivex/internal/observers/LambdaObserver;->g:Lio/reactivex/functions/Consumer;
iput-object p3, p0, Lio/reactivex/internal/observers/LambdaObserver;->h:Lio/reactivex/functions/Action;
iput-object p4, p0, Lio/reactivex/internal/observers/LambdaObserver;->i:Lio/reactivex/functions/Consumer;
return-void
.end method
# virtual methods
.method public a(Lio/reactivex/disposables/Disposable;)V
.registers 3
invoke-static {p0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->p(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/Disposable;)Z
move-result v0
if-eqz v0, :cond_16
:try_start_6
iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->i:Lio/reactivex/functions/Consumer;
invoke-interface {v0, p0}, Lio/reactivex/functions/Consumer;->a(Ljava/lang/Object;)V
:try_end_b
.catchall {:try_start_6 .. :try_end_b} :catchall_c
goto :goto_16
:catchall_c
move-exception v0
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->b(Ljava/lang/Throwable;)V
invoke-interface {p1}, Lio/reactivex/disposables/Disposable;->g()V
invoke-virtual {p0, v0}, Lio/reactivex/internal/observers/LambdaObserver;->b(Ljava/lang/Throwable;)V
:cond_16
:goto_16
return-void
.end method
.method public b(Ljava/lang/Throwable;)V
.registers 6
invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->j()Z
move-result v0
if-nez v0, :cond_27
sget-object v0, Lio/reactivex/internal/disposables/DisposableHelper;->f:Lio/reactivex/internal/disposables/DisposableHelper;
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
:try_start_b
iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->g:Lio/reactivex/functions/Consumer;
invoke-interface {v0, p1}, Lio/reactivex/functions/Consumer;->a(Ljava/lang/Object;)V
:try_end_10
.catchall {:try_start_b .. :try_end_10} :catchall_11
goto :goto_2a
:catchall_11
move-exception v0
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->b(Ljava/lang/Throwable;)V
new-instance v1, Lio/reactivex/exceptions/CompositeException;
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Throwable;
const/4 v3, 0x0
aput-object p1, v2, v3
const/4 p1, 0x1
aput-object v0, v2, p1
invoke-direct {v1, v2}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
invoke-static {v1}, Lio/reactivex/plugins/RxJavaPlugins;->m(Ljava/lang/Throwable;)V
goto :goto_2a
:cond_27
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->m(Ljava/lang/Throwable;)V
:goto_2a
return-void
.end method
.method public c(Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->j()Z
move-result v0
if-nez v0, :cond_1c
:try_start_6
iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->f:Lio/reactivex/functions/Consumer;
invoke-interface {v0, p1}, Lio/reactivex/functions/Consumer;->a(Ljava/lang/Object;)V
:try_end_b
.catchall {:try_start_6 .. :try_end_b} :catchall_c
goto :goto_1c
:catchall_c
move-exception p1
invoke-static {p1}, Lio/reactivex/exceptions/Exceptions;->b(Ljava/lang/Throwable;)V
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/reactivex/disposables/Disposable;
invoke-interface {v0}, Lio/reactivex/disposables/Disposable;->g()V
invoke-virtual {p0, p1}, Lio/reactivex/internal/observers/LambdaObserver;->b(Ljava/lang/Throwable;)V
:cond_1c
:goto_1c
return-void
.end method
.method public g()V
.registers 1
invoke-static {p0}, Lio/reactivex/internal/disposables/DisposableHelper;->f(Ljava/util/concurrent/atomic/AtomicReference;)Z
return-void
.end method
.method public j()Z
.registers 3
invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->f:Lio/reactivex/internal/disposables/DisposableHelper;
if-ne v0, v1, :cond_a
const/4 v0, 0x1
goto :goto_b
:cond_a
const/4 v0, 0x0
:goto_b
return v0
.end method
.method public onComplete()V
.registers 2
invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->j()Z
move-result v0
if-nez v0, :cond_18
sget-object v0, Lio/reactivex/internal/disposables/DisposableHelper;->f:Lio/reactivex/internal/disposables/DisposableHelper;
invoke-virtual {p0, v0}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V
:try_start_b
iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->h:Lio/reactivex/functions/Action;
invoke-interface {v0}, Lio/reactivex/functions/Action;->run()V
:try_end_10
.catchall {:try_start_b .. :try_end_10} :catchall_11
goto :goto_18
:catchall_11
move-exception v0
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->b(Ljava/lang/Throwable;)V
invoke-static {v0}, Lio/reactivex/plugins/RxJavaPlugins;->m(Ljava/lang/Throwable;)V
:cond_18
:goto_18
return-void
.end method