cl.smali

.class final Lio/reactivex/internal/operators/observable/cl;
.super Ljava/lang/Object;
.source "ObservableGenerate.java"

# interfaces
.implements Lio/reactivex/d;
.implements Lio/reactivex/disposables/b;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        "S:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lio/reactivex/d",
        "<TT;>;",
        "Lio/reactivex/disposables/b;"
    }
.end annotation


# instance fields
.field private actual:Lio/reactivex/r;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/r",
            "<-TT;>;"
        }
    .end annotation
.end field

.field final bQk:Lio/reactivex/b/c;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/b/c",
            "<TS;-",
            "Lio/reactivex/d",
            "<TT;>;TS;>;"
        }
    .end annotation
.end field

.field private bQl:Lio/reactivex/b/g;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/b/g",
            "<-TS;>;"
        }
    .end annotation
.end field

.field bQm:Z

.field volatile cancelled:Z

.field hasNext:Z

.field state:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TS;"
        }
    .end annotation
.end field


# direct methods
.method constructor <init>(Lio/reactivex/r;Lio/reactivex/b/c;Lio/reactivex/b/g;Ljava/lang/Object;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lio/reactivex/r",
            "<-TT;>;",
            "Lio/reactivex/b/c",
            "<TS;-",
            "Lio/reactivex/d",
            "<TT;>;TS;>;",
            "Lio/reactivex/b/g",
            "<-TS;>;TS;)V"
        }
    .end annotation

    .prologue
    .line 71
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 72
    iput-object p1, p0, Lio/reactivex/internal/operators/observable/cl;->actual:Lio/reactivex/r;

    .line 73
    iput-object p2, p0, Lio/reactivex/internal/operators/observable/cl;->bQk:Lio/reactivex/b/c;

    .line 74
    iput-object p3, p0, Lio/reactivex/internal/operators/observable/cl;->bQl:Lio/reactivex/b/g;

    .line 75
    iput-object p4, p0, Lio/reactivex/internal/operators/observable/cl;->state:Ljava/lang/Object;

    .line 76
    return-void
.end method


# virtual methods
.method final aL(Ljava/lang/Object;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TS;)V"
        }
    .end annotation

    .prologue
    .line 122
    :try_start_0
    iget-object v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQl:Lio/reactivex/b/g;

    invoke-interface {v0, p1}, Lio/reactivex/b/g;->accept(Ljava/lang/Object;)V
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_5} :catch_6

    .line 127
    :goto_5
    return-void

    .line 123
    :catch_6
    move-exception v0

    .line 124
    invoke-static {v0}, Lio/reactivex/exceptions/d;->throwIfFatal(Ljava/lang/Throwable;)V

    .line 125
    invoke-static {v0}, Lio/reactivex/d/a;->onError(Ljava/lang/Throwable;)V

    goto :goto_5
.end method

.method public final dispose()V
    .registers 2

    .prologue
    .line 131
    const/4 v0, 0x1

    iput-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->cancelled:Z

    .line 132
    return-void
.end method

.method public final isDisposed()Z
    .registers 2

    .prologue
    .line 136
    iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->cancelled:Z

    return v0
.end method

.method public final onComplete()V
    .registers 2

    .prologue
    .line 171
    iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQm:Z

    if-nez v0, :cond_c

    .line 172
    const/4 v0, 0x1

    iput-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQm:Z

    .line 173
    iget-object v0, p0, Lio/reactivex/internal/operators/observable/cl;->actual:Lio/reactivex/r;

    invoke-interface {v0}, Lio/reactivex/r;->onComplete()V

    .line 175
    :cond_c
    return-void
.end method

.method public final onError(Ljava/lang/Throwable;)V
    .registers 3

    .prologue
    .line 158
    iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQm:Z

    if-eqz v0, :cond_8

    .line 159
    invoke-static {p1}, Lio/reactivex/d/a;->onError(Ljava/lang/Throwable;)V

    .line 167
    :goto_7
    return-void

    .line 161
    :cond_8
    if-nez p1, :cond_11

    .line 162
    new-instance p1, Ljava/lang/NullPointerException;

    const-string v0, "onError called with null. Null values are generally not allowed in 2.x operators and sources."

    invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    .line 164
    :cond_11
    const/4 v0, 0x1

    iput-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQm:Z

    .line 165
    iget-object v0, p0, Lio/reactivex/internal/operators/observable/cl;->actual:Lio/reactivex/r;

    invoke-interface {v0, p1}, Lio/reactivex/r;->onError(Ljava/lang/Throwable;)V

    goto :goto_7
.end method

.method public final onNext(Ljava/lang/Object;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    .prologue
    .line 142
    iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->bQm:Z

    if-nez v0, :cond_12

    .line 143
    iget-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->hasNext:Z

    if-eqz v0, :cond_13

    .line 144
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "onNext already called in this generate turn"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/observable/cl;->onError(Ljava/lang/Throwable;)V

    .line 154
    :cond_12
    :goto_12
    return-void

    .line 146
    :cond_13
    if-nez p1, :cond_20

    .line 147
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "onNext called with null. Null values are generally not allowed in 2.x operators and sources."

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/observable/cl;->onError(Ljava/lang/Throwable;)V

    goto :goto_12

    .line 149
    :cond_20
    const/4 v0, 0x1

    iput-boolean v0, p0, Lio/reactivex/internal/operators/observable/cl;->hasNext:Z

    .line 150
    iget-object v0, p0, Lio/reactivex/internal/operators/observable/cl;->actual:Lio/reactivex/r;

    invoke-interface {v0, p1}, Lio/reactivex/r;->onNext(Ljava/lang/Object;)V

    goto :goto_12
.end method