.class public final Lio/reactivex/internal/observers/LambdaObserver; .super Ljava/util/concurrent/atomic/AtomicReference; .source "LambdaObserver.java" # interfaces .implements Lio/reactivex/Observer; .implements Lio/reactivex/disposables/Disposable; # annotations .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/util/concurrent/atomic/AtomicReference<", "Lio/reactivex/disposables/Disposable;", ">;", "Lio/reactivex/Observer<", "TT;>;", "Lio/reactivex/disposables/Disposable;" } .end annotation # static fields .field private static final serialVersionUID:J = -0x64a12a8486b15cccL # instance fields .field final onComplete:Lio/reactivex/functions/Action; .field final onError:Lio/reactivex/functions/Consumer; .annotation system Ldalvik/annotation/Signature; value = { "Lio/reactivex/functions/Consumer<", "-", "Ljava/lang/Throwable;", ">;" } .end annotation .end field .field final onNext:Lio/reactivex/functions/Consumer; .annotation system Ldalvik/annotation/Signature; value = { "Lio/reactivex/functions/Consumer<", "-TT;>;" } .end annotation .end field .field final onSubscribe: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 (Lio/reactivex/functions/Consumer;Lio/reactivex/functions/Consumer;Lio/reactivex/functions/Action;Lio/reactivex/functions/Consumer;)V .locals 0 .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 .line 36 invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;->()V .line 37 iput-object p1, p0, Lio/reactivex/internal/observers/LambdaObserver;->onNext:Lio/reactivex/functions/Consumer; .line 38 iput-object p2, p0, Lio/reactivex/internal/observers/LambdaObserver;->onError:Lio/reactivex/functions/Consumer; .line 39 iput-object p3, p0, Lio/reactivex/internal/observers/LambdaObserver;->onComplete:Lio/reactivex/functions/Action; .line 40 iput-object p4, p0, Lio/reactivex/internal/observers/LambdaObserver;->onSubscribe:Lio/reactivex/functions/Consumer; return-void .end method # virtual methods .method public dispose()V .locals 0 .line 95 invoke-static {p0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z return-void .end method .method public isDisposed()Z .locals 2 .line 100 invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->get()Ljava/lang/Object; move-result-object v0 sget-object v1, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper; if-ne 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 onComplete()V .locals 1 .line 82 invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->isDisposed()Z move-result v0 if-nez v0, :cond_0 .line 83 sget-object v0, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper; invoke-virtual {p0, v0}, Lio/reactivex/internal/observers/LambdaObserver;->lazySet(Ljava/lang/Object;)V .line 85 :try_start_0 iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->onComplete:Lio/reactivex/functions/Action; invoke-interface {v0}, Lio/reactivex/functions/Action;->run()V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v0 .line 87 invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V .line 88 invoke-static {v0}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V :cond_0 :goto_0 return-void .end method .method public onError(Ljava/lang/Throwable;)V .locals 4 .line 69 invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->isDisposed()Z move-result v0 if-nez v0, :cond_0 .line 70 sget-object v0, Lio/reactivex/internal/disposables/DisposableHelper;->DISPOSED:Lio/reactivex/internal/disposables/DisposableHelper; invoke-virtual {p0, v0}, Lio/reactivex/internal/observers/LambdaObserver;->lazySet(Ljava/lang/Object;)V .line 72 :try_start_0 iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->onError:Lio/reactivex/functions/Consumer; invoke-interface {v0, p1}, Lio/reactivex/functions/Consumer;->accept(Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception v0 .line 74 invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V .line 75 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;->([Ljava/lang/Throwable;)V invoke-static {v1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V :cond_0 :goto_0 return-void .end method .method public onNext(Ljava/lang/Object;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TT;)V" } .end annotation .line 57 invoke-virtual {p0}, Lio/reactivex/internal/observers/LambdaObserver;->isDisposed()Z move-result v0 if-nez v0, :cond_0 .line 59 :try_start_0 iget-object v0, p0, Lio/reactivex/internal/observers/LambdaObserver;->onNext:Lio/reactivex/functions/Consumer; invoke-interface {v0, p1}, Lio/reactivex/functions/Consumer;->accept(Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p1 .line 61 invoke-static {p1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V .line 62 invoke-virtual {p0, p1}, Lio/reactivex/internal/observers/LambdaObserver;->onError(Ljava/lang/Throwable;)V :cond_0 :goto_0 return-void .end method .method public onSubscribe(Lio/reactivex/disposables/Disposable;)V .locals 0 .line 45 invoke-static {p0, p1}, Lio/reactivex/internal/disposables/DisposableHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lio/reactivex/disposables/Disposable;)Z move-result p1 if-eqz p1, :cond_0 .line 47 :try_start_0 iget-object p1, p0, Lio/reactivex/internal/observers/LambdaObserver;->onSubscribe:Lio/reactivex/functions/Consumer; invoke-interface {p1, p0}, Lio/reactivex/functions/Consumer;->accept(Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p1 .line 49 invoke-static {p1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V .line 50 invoke-virtual {p0, p1}, Lio/reactivex/internal/observers/LambdaObserver;->onError(Ljava/lang/Throwable;)V :cond_0 :goto_0 return-void .end method