123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- .class public final Lokhttp3/Cookie$Builder;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/Cookie;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x19
- name = "Builder"
- .end annotation
- # instance fields
- .field domain:Ljava/lang/String;
- .field expiresAt:J
- .field hostOnly:Z
- .field httpOnly:Z
- .field name:Ljava/lang/String;
- .field path:Ljava/lang/String;
- .field persistent:Z
- .field secure:Z
- .field value:Ljava/lang/String;
- # direct methods
- .method public constructor <init>()V
- .locals 2
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- const-wide v0, 0xe677d21fdbffL
- iput-wide v0, p0, Lokhttp3/Cookie$Builder;->expiresAt:J
- const-string v0, "/"
- iput-object v0, p0, Lokhttp3/Cookie$Builder;->path:Ljava/lang/String;
- return-void
- .end method
- .method private domain(Ljava/lang/String;Z)Lokhttp3/Cookie$Builder;
- .locals 2
- if-eqz p1, :cond_1
- invoke-static {p1}, Lokhttp3/internal/Util;->canonicalizeHost(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v0
- if-eqz v0, :cond_0
- iput-object v0, p0, Lokhttp3/Cookie$Builder;->domain:Ljava/lang/String;
- iput-boolean p2, p0, Lokhttp3/Cookie$Builder;->hostOnly:Z
- return-object p0
- :cond_0
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "unexpected domain: "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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
- :cond_1
- new-instance p1, Ljava/lang/NullPointerException;
- const-string p2, "domain == null"
- invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- # virtual methods
- .method public build()Lokhttp3/Cookie;
- .locals 1
- new-instance v0, Lokhttp3/Cookie;
- invoke-direct {v0, p0}, Lokhttp3/Cookie;-><init>(Lokhttp3/Cookie$Builder;)V
- return-object v0
- .end method
- .method public domain(Ljava/lang/String;)Lokhttp3/Cookie$Builder;
- .locals 1
- const/4 v0, 0x0
- invoke-direct {p0, p1, v0}, Lokhttp3/Cookie$Builder;->domain(Ljava/lang/String;Z)Lokhttp3/Cookie$Builder;
- move-result-object p1
- return-object p1
- .end method
- .method public expiresAt(J)Lokhttp3/Cookie$Builder;
- .locals 3
- const-wide/16 v0, 0x0
- cmp-long v2, p1, v0
- if-gtz v2, :cond_0
- const-wide/high16 p1, -0x8000000000000000L
- :cond_0
- const-wide v0, 0xe677d21fdbffL
- cmp-long v2, p1, v0
- if-lez v2, :cond_1
- move-wide p1, v0
- :cond_1
- iput-wide p1, p0, Lokhttp3/Cookie$Builder;->expiresAt:J
- const/4 p1, 0x1
- iput-boolean p1, p0, Lokhttp3/Cookie$Builder;->persistent:Z
- return-object p0
- .end method
- .method public hostOnlyDomain(Ljava/lang/String;)Lokhttp3/Cookie$Builder;
- .locals 1
- const/4 v0, 0x1
- invoke-direct {p0, p1, v0}, Lokhttp3/Cookie$Builder;->domain(Ljava/lang/String;Z)Lokhttp3/Cookie$Builder;
- move-result-object p1
- return-object p1
- .end method
- .method public httpOnly()Lokhttp3/Cookie$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/Cookie$Builder;->httpOnly:Z
- return-object p0
- .end method
- .method public name(Ljava/lang/String;)Lokhttp3/Cookie$Builder;
- .locals 1
- if-eqz p1, :cond_1
- invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;
- move-result-object v0
- invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_0
- iput-object p1, p0, Lokhttp3/Cookie$Builder;->name:Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "name is not trimmed"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_1
- new-instance p1, Ljava/lang/NullPointerException;
- const-string v0, "name == null"
- invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public path(Ljava/lang/String;)Lokhttp3/Cookie$Builder;
- .locals 1
- const-string v0, "/"
- invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
- move-result v0
- if-eqz v0, :cond_0
- iput-object p1, p0, Lokhttp3/Cookie$Builder;->path:Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "path must start with \'/\'"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public secure()Lokhttp3/Cookie$Builder;
- .locals 1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/Cookie$Builder;->secure:Z
- return-object p0
- .end method
- .method public value(Ljava/lang/String;)Lokhttp3/Cookie$Builder;
- .locals 1
- if-eqz p1, :cond_1
- invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;
- move-result-object v0
- invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_0
- iput-object p1, p0, Lokhttp3/Cookie$Builder;->value:Ljava/lang/String;
- return-object p0
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "value is not trimmed"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_1
- new-instance p1, Ljava/lang/NullPointerException;
- const-string v0, "value == null"
- invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
|