Rabbit-R1/switch port/smali/smali_classes3/okhttp3/CacheControl$Builder.smali
2024-05-21 17:08:36 -04:00

444 lines
11 KiB
Smali

.class public final Lokhttp3/CacheControl$Builder;
.super Ljava/lang/Object;
.source "CacheControl.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/CacheControl;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Builder"
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nCacheControl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CacheControl.kt\nokhttp3/CacheControl$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,416:1\n1#2:417\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0007\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\t\n\u0000\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J\u0006\u0010\r\u001a\u00020\u000eJ\u0006\u0010\u0003\u001a\u00020\u0000J\u0016\u0010\u000f\u001a\u00020\u00002\u0006\u0010\u000f\u001a\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u0011J\u0016\u0010\u0012\u001a\u00020\u00002\u0006\u0010\u0012\u001a\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u0011J\u0016\u0010\u0013\u001a\u00020\u00002\u0006\u0010\u0013\u001a\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u0011J\u0006\u0010\t\u001a\u00020\u0000J\u0006\u0010\n\u001a\u00020\u0000J\u0006\u0010\u000b\u001a\u00020\u0000J\u0006\u0010\u000c\u001a\u00020\u0000J\u000c\u0010\u0014\u001a\u00020\u0006*\u00020\u0015H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0008\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000c\u001a\u00020\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0016"
}
d2 = {
"Lokhttp3/CacheControl$Builder;",
"",
"()V",
"immutable",
"",
"maxAgeSeconds",
"",
"maxStaleSeconds",
"minFreshSeconds",
"noCache",
"noStore",
"noTransform",
"onlyIfCached",
"build",
"Lokhttp3/CacheControl;",
"maxAge",
"timeUnit",
"Ljava/util/concurrent/TimeUnit;",
"maxStale",
"minFresh",
"clampToInt",
"",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field private immutable:Z
.field private maxAgeSeconds:I
.field private maxStaleSeconds:I
.field private minFreshSeconds:I
.field private noCache:Z
.field private noStore:Z
.field private noTransform:Z
.field private onlyIfCached:Z
# direct methods
.method public constructor <init>()V
.locals 1
.line 168
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lokhttp3/CacheControl$Builder;->maxAgeSeconds:I
iput v0, p0, Lokhttp3/CacheControl$Builder;->maxStaleSeconds:I
iput v0, p0, Lokhttp3/CacheControl$Builder;->minFreshSeconds:I
return-void
.end method
.method private final clampToInt(J)I
.locals 2
const p0, 0x7fffffff
int-to-long v0, p0
cmp-long v0, p1, v0
if-lez v0, :cond_0
goto :goto_0
:cond_0
long-to-int p0, p1
:goto_0
return p0
.end method
# virtual methods
.method public final build()Lokhttp3/CacheControl;
.locals 16
move-object/from16 v0, p0
.line 253
new-instance v15, Lokhttp3/CacheControl;
iget-boolean v1, v0, Lokhttp3/CacheControl$Builder;->noCache:Z
iget-boolean v2, v0, Lokhttp3/CacheControl$Builder;->noStore:Z
iget v3, v0, Lokhttp3/CacheControl$Builder;->maxAgeSeconds:I
const/4 v4, -0x1
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
iget v8, v0, Lokhttp3/CacheControl$Builder;->maxStaleSeconds:I
iget v9, v0, Lokhttp3/CacheControl$Builder;->minFreshSeconds:I
iget-boolean v10, v0, Lokhttp3/CacheControl$Builder;->onlyIfCached:Z
iget-boolean v11, v0, Lokhttp3/CacheControl$Builder;->noTransform:Z
iget-boolean v12, v0, Lokhttp3/CacheControl$Builder;->immutable:Z
const/4 v13, 0x0
const/4 v14, 0x0
move-object v0, v15
invoke-direct/range {v0 .. v14}, Lokhttp3/CacheControl;-><init>(ZZIIZZZIIZZZLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v15
.end method
.method public final immutable()Lokhttp3/CacheControl$Builder;
.locals 1
.line 241
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->immutable:Z
return-object p0
.end method
.method public final maxAge(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
.locals 2
const-string v0, "timeUnit"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 195
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
if-ltz p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
int-to-long v0, p1
.line 197
invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
move-result-wide p1
.line 198
invoke-direct {p0, p1, p2}, Lokhttp3/CacheControl$Builder;->clampToInt(J)I
move-result p1
iput p1, p0, Lokhttp3/CacheControl$Builder;->maxAgeSeconds:I
return-object p0
.line 196
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string p2, "maxAge < 0: "
invoke-direct {p0, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public final maxStale(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
.locals 2
const-string v0, "timeUnit"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 208
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
if-ltz p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
int-to-long v0, p1
.line 210
invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
move-result-wide p1
.line 211
invoke-direct {p0, p1, p2}, Lokhttp3/CacheControl$Builder;->clampToInt(J)I
move-result p1
iput p1, p0, Lokhttp3/CacheControl$Builder;->maxStaleSeconds:I
return-object p0
.line 209
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string p2, "maxStale < 0: "
invoke-direct {p0, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public final minFresh(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
.locals 2
const-string v0, "timeUnit"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 222
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
if-ltz p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
int-to-long v0, p1
.line 224
invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
move-result-wide p1
.line 225
invoke-direct {p0, p1, p2}, Lokhttp3/CacheControl$Builder;->clampToInt(J)I
move-result p1
iput p1, p0, Lokhttp3/CacheControl$Builder;->minFreshSeconds:I
return-object p0
.line 223
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string p2, "minFresh < 0: "
invoke-direct {p0, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public final noCache()Lokhttp3/CacheControl$Builder;
.locals 1
.line 179
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noCache:Z
return-object p0
.end method
.method public final noStore()Lokhttp3/CacheControl$Builder;
.locals 1
.line 184
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noStore:Z
return-object p0
.end method
.method public final noTransform()Lokhttp3/CacheControl$Builder;
.locals 1
.line 237
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noTransform:Z
return-object p0
.end method
.method public final onlyIfCached()Lokhttp3/CacheControl$Builder;
.locals 1
.line 232
move-object v0, p0
check-cast v0, Lokhttp3/CacheControl$Builder;
const/4 v0, 0x1
iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->onlyIfCached:Z
return-object p0
.end method