FlowableSingle$SingleElementSubscriber.smali
.class final Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;
.super Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;
.source "FlowableSingle.java"
# interfaces
.implements Lio/reactivex/FlowableSubscriber;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/flowable/FlowableSingle;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = "SingleElementSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lio/reactivex/internal/subscriptions/DeferredScalarSubscription<",
"TT;>;",
"Lio/reactivex/FlowableSubscriber<",
"TT;>;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = -0x4cb078945f01c821L
# instance fields
.field final defaultValue:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
.field done:Z
.field s:Lorg/reactivestreams/Subscription;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lorg/reactivestreams/Subscriber;Ljava/lang/Object;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/reactivestreams/Subscriber<",
"-TT;>;TT;)V"
}
.end annotation
.line 48
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
.local p1, "actual":Lorg/reactivestreams/Subscriber;, "Lorg/reactivestreams/Subscriber<-TT;>;"
.local p2, "defaultValue":Ljava/lang/Object;, "TT;"
invoke-direct {p0, p1}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;-><init>(Lorg/reactivestreams/Subscriber;)V
.line 49
iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->defaultValue:Ljava/lang/Object;
.line 50
return-void
.end method
# virtual methods
.method public cancel()V
.registers 2
.line 105
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
invoke-super {p0}, Lio/reactivex/internal/subscriptions/DeferredScalarSubscription;->cancel()V
.line 106
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0}, Lorg/reactivestreams/Subscription;->cancel()V
.line 107
return-void
.end method
.method public onComplete()V
.registers 3
.line 87
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
if-eqz v0, :cond_5
.line 88
return-void
.line 90
:cond_5
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
.line 91
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->value:Ljava/lang/Object;
.line 92
.local v0, "v":Ljava/lang/Object;, "TT;"
const/4 v1, 0x0
iput-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->value:Ljava/lang/Object;
.line 93
if-nez v0, :cond_11
.line 94
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->defaultValue:Ljava/lang/Object;
.line 96
:cond_11
if-nez v0, :cond_19
.line 97
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v1}, Lorg/reactivestreams/Subscriber;->onComplete()V
goto :goto_1c
.line 99
:cond_19
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->complete(Ljava/lang/Object;)V
.line 101
:goto_1c
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.registers 3
.param p1, "t" # Ljava/lang/Throwable;
.line 77
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
if-eqz v0, :cond_8
.line 78
invoke-static {p1}, Lio/reactivex/plugins/RxJavaPlugins;->onError(Ljava/lang/Throwable;)V
.line 79
return-void
.line 81
:cond_8
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
.line 82
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p1}, Lorg/reactivestreams/Subscriber;->onError(Ljava/lang/Throwable;)V
.line 83
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 63
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
.local p1, "t":Ljava/lang/Object;, "TT;"
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
if-eqz v0, :cond_5
.line 64
return-void
.line 66
:cond_5
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->value:Ljava/lang/Object;
if-eqz v0, :cond_1e
.line 67
const/4 v0, 0x1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->done:Z
.line 68
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-interface {v0}, Lorg/reactivestreams/Subscription;->cancel()V
.line 69
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->actual:Lorg/reactivestreams/Subscriber;
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "Sequence contains more than one element!"
invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
invoke-interface {v0, v1}, Lorg/reactivestreams/Subscriber;->onError(Ljava/lang/Throwable;)V
.line 70
return-void
.line 72
:cond_1e
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->value:Ljava/lang/Object;
.line 73
return-void
.end method
.method public onSubscribe(Lorg/reactivestreams/Subscription;)V
.registers 4
.param p1, "s" # Lorg/reactivestreams/Subscription;
.line 54
.local p0, "this":Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;, "Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber<TT;>;"
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->s:Lorg/reactivestreams/Subscription;
invoke-static {v0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->validate(Lorg/reactivestreams/Subscription;Lorg/reactivestreams/Subscription;)Z
move-result v0
if-eqz v0, :cond_17
.line 55
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->s:Lorg/reactivestreams/Subscription;
.line 56
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableSingle$SingleElementSubscriber;->actual:Lorg/reactivestreams/Subscriber;
invoke-interface {v0, p0}, Lorg/reactivestreams/Subscriber;->onSubscribe(Lorg/reactivestreams/Subscription;)V
.line 57
const-wide v0, 0x7fffffffffffffffL
invoke-interface {p1, v0, v1}, Lorg/reactivestreams/Subscription;->request(J)V
.line 59
:cond_17
return-void
.end method