ForEachWhileSubscriber.smali
.class public final Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;
.super Ljava/util/concurrent/atomic/AtomicReference;
.source "ForEachWhileSubscriber.java"
# interfaces
.implements Lio/reactivex/FlowableSubscriber;
.implements Lio/reactivex/disposables/Disposable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lorg/reactivestreams/Subscription;",
">;",
"Lio/reactivex/FlowableSubscriber<",
"TT;>;",
"Lio/reactivex/disposables/Disposable;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = -0x3d1b3ceaf2a05f88L
# instance fields
.field done:Z
.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/Predicate;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Predicate<",
"-TT;>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lio/reactivex/functions/Predicate;Lio/reactivex/functions/Consumer;Lio/reactivex/functions/Action;)V
.registers 4
.param p3, "onComplete" # Lio/reactivex/functions/Action;
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/functions/Predicate<",
"-TT;>;",
"Lio/reactivex/functions/Consumer<",
"-",
"Ljava/lang/Throwable;",
">;",
"Lio/reactivex/functions/Action;",
")V"
}
.end annotation
.line 43
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
.local p1, "onNext":Lio/reactivex/functions/Predicate;, "Lio/reactivex/functions/Predicate<-TT;>;"
.local p2, "onError":Lio/reactivex/functions/Consumer;, "Lio/reactivex/functions/Consumer<-Ljava/lang/Throwable;>;"
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
.line 44
iput-object p1, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onNext:Lio/reactivex/functions/Predicate;
.line 45
iput-object p2, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onError:Lio/reactivex/functions/Consumer;
.line 46
iput-object p3, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onComplete:Lio/reactivex/functions/Action;
.line 47
return-void
.end method
# virtual methods
.method public dispose()V
.registers 1
.line 109
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
invoke-static {p0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
.line 110
return-void
.end method
.method public isDisposed()Z
.registers 2
.line 114
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lorg/reactivestreams/Subscription;
invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->isCancelled(Lorg/reactivestreams/Subscription;)Z
move-result v0
return v0
.end method
.method public onComplete()V
.registers 2
.line 95
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
iget-boolean v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->done:Z
if-eqz v0, :cond_5
.line 96
return-void
.line 98
:cond_5
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->done:Z
.line 100
:try_start_8
iget-object v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onComplete:Lio/reactivex/functions/Action;
invoke-interface {v0}, Lio/reactivex/functions/Action;->run()V
:try_end_d
.catchall {:try_start_8 .. :try_end_d} :catchall_e
.line 104
goto :goto_15
.line 101
:catchall_e
move-exception v0
.line 102
.local v0, "ex":Ljava/lang/Throwable;
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 103
invoke-static {v0}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 105
.end local v0 # "ex":Ljava/lang/Throwable;
:goto_15
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 7
.param p1, "t" # Ljava/lang/Throwable;
.line 80
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
iget-boolean v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->done:Z
if-eqz v0, :cond_8
.line 81
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 82
return-void
.line 84
:cond_8
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->done:Z
.line 86
:try_start_b
iget-object v1, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onError:Lio/reactivex/functions/Consumer;
invoke-interface {v1, p1}, Lio/reactivex/functions/Consumer;->accept(Ljava/lang/Object;)V
:try_end_10
.catchall {:try_start_b .. :try_end_10} :catchall_11
.line 90
goto :goto_25
.line 87
:catchall_11
move-exception v1
.line 88
.local v1, "ex":Ljava/lang/Throwable;
invoke-static {v1}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 89
new-instance v2, Lio/reactivex/exceptions/CompositeException;
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Throwable;
const/4 v4, 0x0
aput-object p1, v3, v4
aput-object v1, v3, v0
invoke-direct {v2, v3}, Lio/reactivex/exceptions/CompositeException;-><init>([Ljava/lang/Throwable;)V
invoke-static {v2}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 91
.end local v1 # "ex":Ljava/lang/Throwable;
:goto_25
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 58
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
.local p1, "t":Ljava/lang/Object;, "TT;"
iget-boolean v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->done:Z
if-eqz v0, :cond_5
.line 59
return-void
.line 64
:cond_5
:try_start_5
iget-object v0, p0, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onNext:Lio/reactivex/functions/Predicate;
invoke-interface {v0, p1}, Lio/reactivex/functions/Predicate;->test(Ljava/lang/Object;)Z
move-result v0
:try_end_b
.catchall {:try_start_5 .. :try_end_b} :catchall_15
.line 70
.local v0, "b":Z
nop
.line 72
if-nez v0, :cond_14
.line 73
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->dispose()V
.line 74
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onComplete()V
.line 76
:cond_14
return-void
.line 65
.end local v0 # "b":Z
:catchall_15
move-exception v0
.line 66
.local v0, "ex":Ljava/lang/Throwable;
invoke-static {v0}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 67
invoke-virtual {p0}, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->dispose()V
.line 68
invoke-virtual {p0, v0}, Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;->onError(Ljava/lang/Throwable;)V
.line 69
return-void
.end method
.method public onSubscribe(Lorg/reactivestreams/Subscription;)V
.registers 4
.param p1, "s" # Lorg/reactivestreams/Subscription;
.line 51
.local p0, "this":Lio/reactivex/internal/subscribers/ForEachWhileSubscriber;, "Lio/reactivex/internal/subscribers/ForEachWhileSubscriber<TT;>;"
invoke-static {p0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lorg/reactivestreams/Subscription;)Z
move-result v0
if-eqz v0, :cond_e
.line 52
const-wide v0, 0x7fffffffffffffffL
invoke-interface {p1, v0, v1}, Lorg/reactivestreams/Subscription;->request(J)V
.line 54
:cond_e
return-void
.end method