MaybeZipIterable.smali
.class public final Lio/reactivex/internal/operators/maybe/MaybeZipIterable;
.super Lio/reactivex/Maybe;
.source "MaybeZipIterable.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/reactivex/internal/operators/maybe/MaybeZipIterable$SingletonArrayFunc;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">",
"Lio/reactivex/Maybe<",
"TR;>;"
}
.end annotation
# instance fields
.field final sources:Ljava/lang/Iterable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Iterable<",
"+",
"Lio/reactivex/MaybeSource<",
"+TT;>;>;"
}
.end annotation
.end field
.field final zipper:Lio/reactivex/functions/Function;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lio/reactivex/functions/Function<",
"-[",
"Ljava/lang/Object;",
"+TR;>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Ljava/lang/Iterable;Lio/reactivex/functions/Function;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lio/reactivex/MaybeSource<",
"+TT;>;>;",
"Lio/reactivex/functions/Function<",
"-[",
"Ljava/lang/Object;",
"+TR;>;)V"
}
.end annotation
.line 31
.local p0, "this":Lio/reactivex/internal/operators/maybe/MaybeZipIterable;, "Lio/reactivex/internal/operators/maybe/MaybeZipIterable<TT;TR;>;"
.local p1, "sources":Ljava/lang/Iterable;, "Ljava/lang/Iterable<+Lio/reactivex/MaybeSource<+TT;>;>;"
.local p2, "zipper":Lio/reactivex/functions/Function;, "Lio/reactivex/functions/Function<-[Ljava/lang/Object;+TR;>;"
invoke-direct {p0}, Lio/reactivex/Maybe;-><init>()V
.line 32
iput-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeZipIterable;->sources:Ljava/lang/Iterable;
.line 33
iput-object p2, p0, Lio/reactivex/internal/operators/maybe/MaybeZipIterable;->zipper:Lio/reactivex/functions/Function;
.line 34
return-void
.end method
# virtual methods
.method protected subscribeActual(Lio/reactivex/MaybeObserver;)V
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/MaybeObserver<",
"-TR;>;)V"
}
.end annotation
.line 39
.local p0, "this":Lio/reactivex/internal/operators/maybe/MaybeZipIterable;, "Lio/reactivex/internal/operators/maybe/MaybeZipIterable<TT;TR;>;"
.local p1, "observer":Lio/reactivex/MaybeObserver;, "Lio/reactivex/MaybeObserver<-TR;>;"
const/16 v0, 0x8
new-array v0, v0, [Lio/reactivex/MaybeSource;
.line 40
.local v0, "a":[Lio/reactivex/MaybeSource;, "[Lio/reactivex/MaybeSource<+TT;>;"
const/4 v1, 0x0
.line 43
.local v1, "n":I
:try_start_5
iget-object v2, p0, Lio/reactivex/internal/operators/maybe/MaybeZipIterable;->sources:Ljava/lang/Iterable;
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_b
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_3a
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lio/reactivex/MaybeSource;
.line 44
.local v3, "source":Lio/reactivex/MaybeSource;, "Lio/reactivex/MaybeSource<+TT;>;"
if-nez v3, :cond_24
.line 45
new-instance v2, Ljava/lang/NullPointerException;
const-string v4, "One of the sources is null"
invoke-direct {v2, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
invoke-static {v2, p1}, Lio/reactivex/internal/disposables/EmptyDisposable;->error(Ljava/lang/Throwable;Lio/reactivex/MaybeObserver;)V
.line 46
return-void
.line 48
:cond_24
array-length v4, v0
if-ne v1, v4, :cond_31
.line 49
shr-int/lit8 v4, v1, 0x2
add-int/2addr v4, v1
invoke-static {v0, v4}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object v4
check-cast v4, [Lio/reactivex/MaybeSource;
:try_end_30
.catchall {:try_start_5 .. :try_end_30} :catchall_76
move-object v0, v4
.line 51
:cond_31
add-int/lit8 v4, v1, 0x1
.end local v1 # "n":I
.local v4, "n":I
:try_start_33
aput-object v3, v0, v1
:try_end_35
.catchall {:try_start_33 .. :try_end_35} :catchall_37
.line 52
.end local v3 # "source":Lio/reactivex/MaybeSource;, "Lio/reactivex/MaybeSource<+TT;>;"
move v1, v4
goto :goto_b
.line 53
:catchall_37
move-exception v2
move v1, v4
goto :goto_77
.line 57
.end local v4 # "n":I
.restart local v1 # "n":I
:cond_3a
nop
.line 59
if-nez v1, :cond_41
.line 60
invoke-static {p1}, Lio/reactivex/internal/disposables/EmptyDisposable;->complete(Lio/reactivex/MaybeObserver;)V
.line 61
return-void
.line 64
:cond_41
const/4 v2, 0x1
if-ne v1, v2, :cond_55
.line 65
const/4 v2, 0x0
aget-object v2, v0, v2
new-instance v3, Lio/reactivex/internal/operators/maybe/MaybeMap$MapMaybeObserver;
new-instance v4, Lio/reactivex/internal/operators/maybe/MaybeZipIterable$SingletonArrayFunc;
invoke-direct {v4, p0}, Lio/reactivex/internal/operators/maybe/MaybeZipIterable$SingletonArrayFunc;-><init>(Lio/reactivex/internal/operators/maybe/MaybeZipIterable;)V
invoke-direct {v3, p1, v4}, Lio/reactivex/internal/operators/maybe/MaybeMap$MapMaybeObserver;-><init>(Lio/reactivex/MaybeObserver;Lio/reactivex/functions/Function;)V
invoke-interface {v2, v3}, Lio/reactivex/MaybeSource;->subscribe(Lio/reactivex/MaybeObserver;)V
.line 66
return-void
.line 69
:cond_55
new-instance v2, Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;
iget-object v3, p0, Lio/reactivex/internal/operators/maybe/MaybeZipIterable;->zipper:Lio/reactivex/functions/Function;
invoke-direct {v2, p1, v1, v3}, Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;-><init>(Lio/reactivex/MaybeObserver;ILio/reactivex/functions/Function;)V
.line 71
.local v2, "parent":Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;, "Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator<TT;TR;>;"
invoke-interface {p1, v2}, Lio/reactivex/MaybeObserver;->onSubscribe(Lio/reactivex/disposables/Disposable;)V
.line 73
const/4 v3, 0x0
.local v3, "i":I
:goto_60
if-ge v3, v1, :cond_75
.line 74
invoke-virtual {v2}, Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;->isDisposed()Z
move-result v4
if-eqz v4, :cond_69
.line 75
return-void
.line 78
:cond_69
aget-object v4, v0, v3
iget-object v5, v2, Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;->observers:[Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipMaybeObserver;
aget-object v5, v5, v3
invoke-interface {v4, v5}, Lio/reactivex/MaybeSource;->subscribe(Lio/reactivex/MaybeObserver;)V
.line 73
add-int/lit8 v3, v3, 0x1
goto :goto_60
.line 80
.end local v3 # "i":I
:cond_75
return-void
.line 53
.end local v2 # "parent":Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator;, "Lio/reactivex/internal/operators/maybe/MaybeZipArray$ZipCoordinator<TT;TR;>;"
:catchall_76
move-exception v2
.line 54
.local v2, "ex":Ljava/lang/Throwable;
:goto_77
invoke-static {v2}, Lio/reactivex/exceptions/Exceptions;->throwIfFatal(Ljava/lang/Throwable;)V
.line 55
invoke-static {v2, p1}, Lio/reactivex/internal/disposables/EmptyDisposable;->error(Ljava/lang/Throwable;Lio/reactivex/MaybeObserver;)V
.line 56
return-void
.end method