apkfuckery/com.discord/smali_classes2/kotlin/text/Regex.smali
2020-09-09 19:21:20 +00:00

467 lines
12 KiB
Smali

.class public final Lkotlin/text/Regex;
.super Ljava/lang/Object;
.source "Regex.kt"
# interfaces
.implements Ljava/io/Serializable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lkotlin/text/Regex$b;,
Lkotlin/text/Regex$a;
}
.end annotation
# static fields
.field public static final d:Lkotlin/text/Regex$a;
# instance fields
.field public _options:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"+",
"Lk0/t/d;",
">;"
}
.end annotation
.end field
.field public final nativePattern:Ljava/util/regex/Pattern;
# direct methods
.method public static constructor <clinit>()V
.locals 2
new-instance v0, Lkotlin/text/Regex$a;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lkotlin/text/Regex$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lkotlin/text/Regex;->d:Lkotlin/text/Regex$a;
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.locals 1
const-string v0, "pattern"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object p1
const-string v0, "Pattern.compile(pattern)"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lkotlin/text/Regex;-><init>(Ljava/util/regex/Pattern;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Lk0/t/d;)V
.locals 1
const-string v0, "pattern"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "option"
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget p2, p2, Lk0/t/d;->value:I
and-int/lit8 v0, p2, 0x2
if-eqz v0, :cond_0
or-int/lit8 p2, p2, 0x40
:cond_0
invoke-static {p1, p2}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;I)Ljava/util/regex/Pattern;
move-result-object p1
const-string p2, "Pattern.compile(pattern,\u2026nicodeCase(option.value))"
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lkotlin/text/Regex;-><init>(Ljava/util/regex/Pattern;)V
return-void
.end method
.method public constructor <init>(Ljava/util/regex/Pattern;)V
.locals 1
const-string v0, "nativePattern"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
return-void
.end method
.method private final writeReplace()Ljava/lang/Object;
.locals 3
new-instance v0, Lkotlin/text/Regex$b;
iget-object v1, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v1}, Ljava/util/regex/Pattern;->pattern()Ljava/lang/String;
move-result-object v1
const-string v2, "nativePattern.pattern()"
invoke-static {v1, v2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v2, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v2}, Ljava/util/regex/Pattern;->flags()I
move-result v2
invoke-direct {v0, v1, v2}, Lkotlin/text/Regex$b;-><init>(Ljava/lang/String;I)V
return-object v0
.end method
# virtual methods
.method public final find(Ljava/lang/CharSequence;I)Lkotlin/text/MatchResult;
.locals 2
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v0
const-string v1, "nativePattern.matcher(input)"
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, p2}, Ljava/util/regex/Matcher;->find(I)Z
move-result p2
if-nez p2, :cond_0
const/4 p1, 0x0
goto :goto_0
:cond_0
new-instance p2, Lk0/t/c;
invoke-direct {p2, v0, p1}, Lk0/t/c;-><init>(Ljava/util/regex/Matcher;Ljava/lang/CharSequence;)V
move-object p1, p2
:goto_0
return-object p1
.end method
.method public final findAll(Ljava/lang/CharSequence;I)Lkotlin/sequences/Sequence;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/CharSequence;",
"I)",
"Lkotlin/sequences/Sequence<",
"Lkotlin/text/MatchResult;",
">;"
}
.end annotation
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
if-ltz p2, :cond_0
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
if-gt p2, v0, :cond_0
new-instance v0, Lkotlin/text/Regex$c;
invoke-direct {v0, p0, p1, p2}, Lkotlin/text/Regex$c;-><init>(Lkotlin/text/Regex;Ljava/lang/CharSequence;I)V
sget-object p1, Lkotlin/text/Regex$d;->d:Lkotlin/text/Regex$d;
const-string p2, "seedFunction"
invoke-static {v0, p2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "nextFunction"
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
new-instance p2, Lk0/s/i;
invoke-direct {p2, v0, p1}, Lk0/s/i;-><init>(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;)V
return-object p2
:cond_0
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
const-string v1, "Start index out of bounds: "
const-string v2, ", input length: "
invoke-static {v1, p2, v2}, Lf/e/b/a/a;->F(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p1
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final matchEntire(Ljava/lang/CharSequence;)Lkotlin/text/MatchResult;
.locals 2
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v0
const-string v1, "nativePattern.matcher(input)"
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z
move-result v1
if-nez v1, :cond_0
const/4 p1, 0x0
goto :goto_0
:cond_0
new-instance v1, Lk0/t/c;
invoke-direct {v1, v0, p1}, Lk0/t/c;-><init>(Ljava/util/regex/Matcher;Ljava/lang/CharSequence;)V
move-object p1, v1
:goto_0
return-object p1
.end method
.method public final matches(Ljava/lang/CharSequence;)Z
.locals 1
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object p1
invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
move-result p1
return p1
.end method
.method public final replace(Ljava/lang/CharSequence;Ljava/lang/String;)Ljava/lang/String;
.locals 1
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "replacement"
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object p1
invoke-virtual {p1, p2}, Ljava/util/regex/Matcher;->replaceAll(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
const-string p2, "nativePattern.matcher(in\u2026).replaceAll(replacement)"
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
.end method
.method public final replace(Ljava/lang/CharSequence;Lkotlin/jvm/functions/Function1;)Ljava/lang/String;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/CharSequence;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Lkotlin/text/MatchResult;",
"+",
"Ljava/lang/CharSequence;",
">;)",
"Ljava/lang/String;"
}
.end annotation
const-string v0, "input"
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "transform"
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
invoke-virtual {p0, p1, v0}, Lkotlin/text/Regex;->find(Ljava/lang/CharSequence;I)Lkotlin/text/MatchResult;
move-result-object v1
if-eqz v1, :cond_3
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v2
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v2}, Ljava/lang/StringBuilder;-><init>(I)V
:cond_0
invoke-static {v1}, Lk0/n/c/i;->checkNotNull(Ljava/lang/Object;)V
invoke-interface {v1}, Lkotlin/text/MatchResult;->getRange()Lkotlin/ranges/IntRange;
move-result-object v4
invoke-virtual {v4}, Lkotlin/ranges/IntRange;->getStart()Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
move-result v4
invoke-virtual {v3, p1, v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;
invoke-interface {p2, v1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/CharSequence;
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;
invoke-interface {v1}, Lkotlin/text/MatchResult;->getRange()Lkotlin/ranges/IntRange;
move-result-object v0
invoke-virtual {v0}, Lkotlin/ranges/IntRange;->getEndInclusive()Ljava/lang/Integer;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
add-int/lit8 v0, v0, 0x1
invoke-interface {v1}, Lkotlin/text/MatchResult;->next()Lkotlin/text/MatchResult;
move-result-object v1
if-ge v0, v2, :cond_1
if-nez v1, :cond_0
:cond_1
if-ge v0, v2, :cond_2
invoke-virtual {v3, p1, v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;
:cond_2
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string p2, "sb.toString()"
invoke-static {p1, p2}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p1
:cond_3
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public toString()Ljava/lang/String;
.locals 2
iget-object v0, p0, Lkotlin/text/Regex;->nativePattern:Ljava/util/regex/Pattern;
invoke-virtual {v0}, Ljava/util/regex/Pattern;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "nativePattern.toString()"
invoke-static {v0, v1}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method