Rabbit-R1/switch port/smali/smali_classes3/kotlin/time/DurationJvmKt.smali
2024-05-21 17:08:36 -04:00

204 lines
5.5 KiB
Smali

.class public final Lkotlin/time/DurationJvmKt;
.super Ljava/lang/Object;
.source "DurationJvm.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nDurationJvm.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DurationJvm.kt\nkotlin/time/DurationJvmKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,33:1\n1#2:34\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000.\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0003\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0006\n\u0002\u0008\u0002\u001a\u0010\u0010\t\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\u000bH\u0002\u001a\u0018\u0010\u000c\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\n\u001a\u00020\u000bH\u0000\u001a\u0018\u0010\u0010\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\n\u001a\u00020\u000bH\u0000\"\u0014\u0010\u0000\u001a\u00020\u0001X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0002\u0010\u0003\"\u001c\u0010\u0004\u001a\u000e\u0012\n\u0012\u0008\u0012\u0004\u0012\u00020\u00070\u00060\u0005X\u0082\u0004\u00a2\u0006\u0004\n\u0002\u0010\u0008\u00a8\u0006\u0011"
}
d2 = {
"durationAssertionsEnabled",
"",
"getDurationAssertionsEnabled",
"()Z",
"precisionFormats",
"",
"Ljava/lang/ThreadLocal;",
"Ljava/text/DecimalFormat;",
"[Ljava/lang/ThreadLocal;",
"createFormatForDecimals",
"decimals",
"",
"formatToExactDecimals",
"",
"value",
"",
"formatUpToDecimals",
"kotlin-stdlib"
}
k = 0x2
mv = {
0x1,
0x9,
0x0
}
xi = 0x30
.end annotation
# static fields
.field private static final durationAssertionsEnabled:Z
.field private static final precisionFormats:[Ljava/lang/ThreadLocal;
.annotation system Ldalvik/annotation/Signature;
value = {
"[",
"Ljava/lang/ThreadLocal<",
"Ljava/text/DecimalFormat;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.locals 4
.line 12
const-class v0, Lkotlin/time/Duration;
const/4 v0, 0x0
sput-boolean v0, Lkotlin/time/DurationJvmKt;->durationAssertionsEnabled:Z
const/4 v1, 0x4
new-array v2, v1, [Ljava/lang/ThreadLocal;
:goto_0
if-ge v0, v1, :cond_0
.line 14
new-instance v3, Ljava/lang/ThreadLocal;
invoke-direct {v3}, Ljava/lang/ThreadLocal;-><init>()V
aput-object v3, v2, v0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
sput-object v2, Lkotlin/time/DurationJvmKt;->precisionFormats:[Ljava/lang/ThreadLocal;
return-void
.end method
.method private static final createFormatForDecimals(I)Ljava/text/DecimalFormat;
.locals 2
.line 16
new-instance v0, Ljava/text/DecimalFormat;
const-string v1, "0"
invoke-direct {v0, v1}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V
if-lez p0, :cond_0
.line 17
invoke-virtual {v0, p0}, Ljava/text/DecimalFormat;->setMinimumFractionDigits(I)V
.line 18
:cond_0
sget-object p0, Ljava/math/RoundingMode;->HALF_UP:Ljava/math/RoundingMode;
invoke-virtual {v0, p0}, Ljava/text/DecimalFormat;->setRoundingMode(Ljava/math/RoundingMode;)V
return-object v0
.end method
.method public static final formatToExactDecimals(DI)Ljava/lang/String;
.locals 2
sget-object v0, Lkotlin/time/DurationJvmKt;->precisionFormats:[Ljava/lang/ThreadLocal;
.line 22
array-length v1, v0
if-ge p2, v1, :cond_1
.line 23
aget-object v0, v0, p2
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v1
if-nez v1, :cond_0
invoke-static {p2}, Lkotlin/time/DurationJvmKt;->createFormatForDecimals(I)Ljava/text/DecimalFormat;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V
goto :goto_0
:cond_0
invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
:goto_0
check-cast v1, Ljava/text/DecimalFormat;
goto :goto_1
.line 25
:cond_1
invoke-static {p2}, Lkotlin/time/DurationJvmKt;->createFormatForDecimals(I)Ljava/text/DecimalFormat;
move-result-object v1
.line 26
:goto_1
invoke-virtual {v1, p0, p1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object p0
const-string p1, "format(...)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public static final formatUpToDecimals(DI)Ljava/lang/String;
.locals 1
const/4 v0, 0x0
.line 30
invoke-static {v0}, Lkotlin/time/DurationJvmKt;->createFormatForDecimals(I)Ljava/text/DecimalFormat;
move-result-object v0
.line 31
invoke-virtual {v0, p2}, Ljava/text/DecimalFormat;->setMaximumFractionDigits(I)V
.line 32
invoke-virtual {v0, p0, p1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
move-result-object p0
const-string p1, "format(...)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public static final getDurationAssertionsEnabled()Z
.locals 1
sget-boolean v0, Lkotlin/time/DurationJvmKt;->durationAssertionsEnabled:Z
return v0
.end method