123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- .class public final Lokhttp3/CacheControl$Builder;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/CacheControl;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x19
- name = "Builder"
- .end annotation
- # instance fields
- .field immutable:Z
- .field maxAgeSeconds:I
- .field maxStaleSeconds:I
- .field minFreshSeconds:I
- .field noCache:Z
- .field noStore:Z
- .field noTransform:Z
- .field onlyIfCached:Z
- # direct methods
- .method public constructor <init>()V
- .locals 1
- 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
- # virtual methods
- .method public build()Lokhttp3/CacheControl;
- .locals 1
- new-instance v0, Lokhttp3/CacheControl;
- invoke-direct {v0, p0}, Lokhttp3/CacheControl;-><init>(Lokhttp3/CacheControl$Builder;)V
- return-object v0
- .end method
- .method public immutable()Lokhttp3/CacheControl$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->immutable:Z
- return-object p0
- .end method
- .method public maxAge(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
- .locals 3
- if-ltz p1, :cond_1
- int-to-long v0, p1
- invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
- move-result-wide p1
- const-wide/32 v0, 0x7fffffff
- cmp-long v2, p1, v0
- if-lez v2, :cond_0
- const p1, 0x7fffffff
- goto :goto_0
- :cond_0
- long-to-int p1, p1
- :goto_0
- iput p1, p0, Lokhttp3/CacheControl$Builder;->maxAgeSeconds:I
- return-object p0
- :cond_1
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "maxAge < 0: "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p2
- .end method
- .method public maxStale(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
- .locals 3
- if-ltz p1, :cond_1
- int-to-long v0, p1
- invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
- move-result-wide p1
- const-wide/32 v0, 0x7fffffff
- cmp-long v2, p1, v0
- if-lez v2, :cond_0
- const p1, 0x7fffffff
- goto :goto_0
- :cond_0
- long-to-int p1, p1
- :goto_0
- iput p1, p0, Lokhttp3/CacheControl$Builder;->maxStaleSeconds:I
- return-object p0
- :cond_1
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "maxStale < 0: "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p2
- .end method
- .method public minFresh(ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
- .locals 3
- if-ltz p1, :cond_1
- int-to-long v0, p1
- invoke-virtual {p2, v0, v1}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
- move-result-wide p1
- const-wide/32 v0, 0x7fffffff
- cmp-long v2, p1, v0
- if-lez v2, :cond_0
- const p1, 0x7fffffff
- goto :goto_0
- :cond_0
- long-to-int p1, p1
- :goto_0
- iput p1, p0, Lokhttp3/CacheControl$Builder;->minFreshSeconds:I
- return-object p0
- :cond_1
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "minFresh < 0: "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p2
- .end method
- .method public noCache()Lokhttp3/CacheControl$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noCache:Z
- return-object p0
- .end method
- .method public noStore()Lokhttp3/CacheControl$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noStore:Z
- return-object p0
- .end method
- .method public noTransform()Lokhttp3/CacheControl$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->noTransform:Z
- return-object p0
- .end method
- .method public onlyIfCached()Lokhttp3/CacheControl$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/CacheControl$Builder;->onlyIfCached:Z
- return-object p0
- .end method
|