213 lines
5.2 KiB
Smali
213 lines
5.2 KiB
Smali
.class public final Landroidx/core/view/TreeIterator;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/Iterator;
|
|
.implements Lkotlin/jvm/internal/markers/KMappedMarker;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Ljava/util/Iterator<",
|
|
"TT;>;",
|
|
"Lkotlin/jvm/internal/markers/KMappedMarker;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final getChildIterator:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private iterator:Ljava/util/Iterator;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Iterator<",
|
|
"+TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final stack:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/util/Iterator<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/Iterator;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Iterator<",
|
|
"+TT;>;",
|
|
"Lkotlin/jvm/functions/Function1;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 144
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p2, p0, Landroidx/core/view/TreeIterator;->getChildIterator:Lkotlin/jvm/functions/Function1;
|
|
|
|
.line 148
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object p2, p0, Landroidx/core/view/TreeIterator;->stack:Ljava/util/List;
|
|
|
|
iput-object p1, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final prepareNextIterator(Ljava/lang/Object;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/core/view/TreeIterator;->getChildIterator:Lkotlin/jvm/functions/Function1;
|
|
|
|
.line 167
|
|
invoke-interface {v0, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Iterator;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 168
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/core/view/TreeIterator;->stack:Ljava/util/List;
|
|
|
|
iget-object v1, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 169
|
|
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
iput-object p1, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 172
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
iget-object p1, p0, Landroidx/core/view/TreeIterator;->stack:Ljava/util/List;
|
|
|
|
check-cast p1, Ljava/util/Collection;
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Landroidx/core/view/TreeIterator;->stack:Ljava/util/List;
|
|
|
|
.line 173
|
|
invoke-static {p1}, Lkotlin/collections/CollectionsKt;->last(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Iterator;
|
|
|
|
iput-object p1, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
iget-object p1, p0, Landroidx/core/view/TreeIterator;->stack:Ljava/util/List;
|
|
|
|
.line 177
|
|
invoke-static {p1}, Lkotlin/collections/CollectionsKt;->removeLast(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public hasNext()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 153
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public next()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TT;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/core/view/TreeIterator;->iterator:Ljava/util/Iterator;
|
|
|
|
.line 157
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
.line 158
|
|
invoke-direct {p0, v0}, Landroidx/core/view/TreeIterator;->prepareNextIterator(Ljava/lang/Object;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public remove()V
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v1, "Operation is not supported for read-only collection"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|