OnSubscribeFromIterable.smali
.class public final Lrx/internal/operators/OnSubscribeFromIterable;
.super Ljava/lang/Object;
.source "OnSubscribeFromIterable.java"
# interfaces
.implements Lrx/Observable$OnSubscribe;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lrx/internal/operators/OnSubscribeFromIterable$IterableProducer;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lrx/Observable$OnSubscribe<",
"TT;>;"
}
.end annotation
# instance fields
.field final is:Ljava/lang/Iterable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Iterable<",
"+TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Iterable;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+TT;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-eqz p1, :cond_8
.line 2
iput-object p1, p0, Lrx/internal/operators/OnSubscribeFromIterable;->is:Ljava/lang/Iterable;
return-void
.line 3
:cond_8
new-instance p1, Ljava/lang/NullPointerException;
const-string v0, "iterable must not be null"
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p1
.end method
# virtual methods
.method public bridge synthetic call(Ljava/lang/Object;)V
.registers 2
.line 1
check-cast p1, Lrx/Subscriber;
invoke-virtual {p0, p1}, Lrx/internal/operators/OnSubscribeFromIterable;->call(Lrx/Subscriber;)V
return-void
.end method
.method public call(Lrx/Subscriber;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Subscriber<",
"-TT;>;)V"
}
.end annotation
.line 2
:try_start_0
iget-object v0, p0, Lrx/internal/operators/OnSubscribeFromIterable;->is:Ljava/lang/Iterable;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
.line 3
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
:try_end_a
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_a} :catch_1f
.line 4
invoke-virtual {p1}, Lrx/Subscriber;->isUnsubscribed()Z
move-result v2
if-nez v2, :cond_1e
if-nez v1, :cond_16
.line 5
invoke-interface {p1}, Lrx/Observer;->onCompleted()V
goto :goto_1e
.line 6
:cond_16
new-instance v1, Lrx/internal/operators/OnSubscribeFromIterable$IterableProducer;
invoke-direct {v1, p1, v0}, Lrx/internal/operators/OnSubscribeFromIterable$IterableProducer;-><init>(Lrx/Subscriber;Ljava/util/Iterator;)V
invoke-virtual {p1, v1}, Lrx/Subscriber;->setProducer(Lrx/Producer;)V
:cond_1e
:goto_1e
return-void
:catch_1f
move-exception v0
.line 7
invoke-static {v0, p1}, Lrx/exceptions/Exceptions;->throwOrReport(Ljava/lang/Throwable;Lrx/Observer;)V
return-void
.end method