2019-07-24 11:27:29 +00:00
|
|
|
.class public Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
.super Lcom/discord/simpleast/core/node/Node;
|
|
|
|
.source "StyleNode.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/simpleast/core/node/StyleNode$a;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<RC:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
|
|
"TRC;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2019-10-11 21:55:41 +00:00
|
|
|
.field public static final Bi:Lcom/discord/simpleast/core/node/StyleNode$a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-10-11 21:55:41 +00:00
|
|
|
.field private final Bh:Ljava/util/List;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/simpleast/core/node/StyleNode$a;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/simpleast/core/node/StyleNode$a;-><init>(B)V
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
sput-object v0, Lcom/discord/simpleast/core/node/StyleNode;->Bi:Lcom/discord/simpleast/core/node/StyleNode$a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Ljava/util/List;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+TT;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "styles"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/simpleast/core/node/Node;-><init>()V
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/simpleast/core/node/StyleNode;->Bh:Ljava/util/List;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final b(Ljava/lang/String;Ljava/util/List;)Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<RC:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">(",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Landroid/text/style/CharacterStyle;",
|
|
|
|
">;)",
|
|
|
|
"Lcom/discord/simpleast/core/node/StyleNode<",
|
|
|
|
"TRC;",
|
|
|
|
"Landroid/text/style/CharacterStyle;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "content"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v0, "styles"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/simpleast/core/node/a;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/discord/simpleast/core/node/a;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/simpleast/core/node/Node;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/simpleast/core/node/StyleNode;->addChild(Lcom/discord/simpleast/core/node/Node;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public render(Landroid/text/SpannableStringBuilder;Ljava/lang/Object;)V
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Landroid/text/SpannableStringBuilder;",
|
|
|
|
"TRC;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "builder"
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/text/SpannableStringBuilder;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/simpleast/core/node/StyleNode;->getChildren()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Lcom/discord/simpleast/core/node/Node;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1, p2}, Lcom/discord/simpleast/core/node/Node;->render(Landroid/text/SpannableStringBuilder;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object p2, p0, Lcom/discord/simpleast/core/node/StyleNode;->Bh:Ljava/util/List;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
check-cast p2, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/text/SpannableStringBuilder;->length()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
const/16 v3, 0x21
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v0, v2, v3}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
2019-10-09 23:16:36 +00:00
|
|
|
.locals 11
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, " >\n"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/simpleast/core/node/StyleNode;->getChildren()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
move-object v2, v1
|
|
|
|
|
|
|
|
check-cast v2, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
const-string v1, "\n->"
|
|
|
|
|
|
|
|
move-object v3, v1
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, ">>"
|
|
|
|
|
|
|
|
move-object v4, v1
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const-string v1, "\n>|"
|
|
|
|
|
|
|
|
move-object v5, v1
|
|
|
|
|
|
|
|
check-cast v5, Ljava/lang/CharSequence;
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
sget-object v1, Lcom/discord/simpleast/core/node/StyleNode$b;->Bj:Lcom/discord/simpleast/core/node/StyleNode$b;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-object v8, v1
|
|
|
|
|
|
|
|
check-cast v8, Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
const/16 v9, 0x18
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
const/4 v10, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v2 .. v10}, Lkotlin/a/m;->joinToString$default(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|