123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- .class public Lokhttp3/Response$Builder;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/Response;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x9
- name = "Builder"
- .end annotation
- # instance fields
- .field body:Lokhttp3/ResponseBody;
- .field cacheResponse:Lokhttp3/Response;
- .field code:I
- .field handshake:Lokhttp3/Handshake;
- .field headers:Lokhttp3/Headers$Builder;
- .field message:Ljava/lang/String;
- .field networkResponse:Lokhttp3/Response;
- .field priorResponse:Lokhttp3/Response;
- .field protocol:Lokhttp3/Protocol;
- .field receivedResponseAtMillis:J
- .field request:Lokhttp3/Request;
- .field sentRequestAtMillis:J
- # 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/Response$Builder;->code:I
- new-instance v0, Lokhttp3/Headers$Builder;
- invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
- iput-object v0, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- return-void
- .end method
- .method constructor <init>(Lokhttp3/Response;)V
- .locals 2
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- const/4 v0, -0x1
- iput v0, p0, Lokhttp3/Response$Builder;->code:I
- iget-object v0, p1, Lokhttp3/Response;->request:Lokhttp3/Request;
- iput-object v0, p0, Lokhttp3/Response$Builder;->request:Lokhttp3/Request;
- iget-object v0, p1, Lokhttp3/Response;->protocol:Lokhttp3/Protocol;
- iput-object v0, p0, Lokhttp3/Response$Builder;->protocol:Lokhttp3/Protocol;
- iget v0, p1, Lokhttp3/Response;->code:I
- iput v0, p0, Lokhttp3/Response$Builder;->code:I
- iget-object v0, p1, Lokhttp3/Response;->message:Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/Response$Builder;->message:Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/Response;->handshake:Lokhttp3/Handshake;
- iput-object v0, p0, Lokhttp3/Response$Builder;->handshake:Lokhttp3/Handshake;
- iget-object v0, p1, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- invoke-virtual {v0}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- iget-object v0, p1, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- iput-object v0, p0, Lokhttp3/Response$Builder;->body:Lokhttp3/ResponseBody;
- iget-object v0, p1, Lokhttp3/Response;->networkResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response$Builder;->networkResponse:Lokhttp3/Response;
- iget-object v0, p1, Lokhttp3/Response;->cacheResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response$Builder;->cacheResponse:Lokhttp3/Response;
- iget-object v0, p1, Lokhttp3/Response;->priorResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response$Builder;->priorResponse:Lokhttp3/Response;
- iget-wide v0, p1, Lokhttp3/Response;->sentRequestAtMillis:J
- iput-wide v0, p0, Lokhttp3/Response$Builder;->sentRequestAtMillis:J
- iget-wide v0, p1, Lokhttp3/Response;->receivedResponseAtMillis:J
- iput-wide v0, p0, Lokhttp3/Response$Builder;->receivedResponseAtMillis:J
- return-void
- .end method
- .method private checkPriorResponse(Lokhttp3/Response;)V
- .locals 1
- iget-object p1, p1, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- if-nez p1, :cond_0
- return-void
- :cond_0
- new-instance p1, Ljava/lang/IllegalArgumentException;
- const-string v0, "priorResponse.body != null"
- invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method private checkSupportResponse(Ljava/lang/String;Lokhttp3/Response;)V
- .locals 1
- iget-object v0, p2, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- if-nez v0, :cond_3
- iget-object v0, p2, Lokhttp3/Response;->networkResponse:Lokhttp3/Response;
- if-nez v0, :cond_2
- iget-object v0, p2, Lokhttp3/Response;->cacheResponse:Lokhttp3/Response;
- if-nez v0, :cond_1
- iget-object p2, p2, Lokhttp3/Response;->priorResponse:Lokhttp3/Response;
- if-nez p2, :cond_0
- return-void
- :cond_0
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p1, ".priorResponse != null"
- 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 p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p1, ".cacheResponse != null"
- 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_2
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p1, ".networkResponse != null"
- 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_3
- new-instance p2, Ljava/lang/IllegalArgumentException;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string p1, ".body != null"
- 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
- .end method
- # virtual methods
- .method public addHeader(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0, p1, p2}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
- .locals 0
- iput-object p1, p0, Lokhttp3/Response$Builder;->body:Lokhttp3/ResponseBody;
- return-object p0
- .end method
- .method public build()Lokhttp3/Response;
- .locals 3
- iget-object v0, p0, Lokhttp3/Response$Builder;->request:Lokhttp3/Request;
- if-eqz v0, :cond_3
- iget-object v0, p0, Lokhttp3/Response$Builder;->protocol:Lokhttp3/Protocol;
- if-eqz v0, :cond_2
- iget v0, p0, Lokhttp3/Response$Builder;->code:I
- if-ltz v0, :cond_1
- iget-object v0, p0, Lokhttp3/Response$Builder;->message:Ljava/lang/String;
- if-eqz v0, :cond_0
- new-instance v0, Lokhttp3/Response;
- invoke-direct {v0, p0}, Lokhttp3/Response;-><init>(Lokhttp3/Response$Builder;)V
- return-object v0
- :cond_0
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "message == null"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_1
- new-instance v0, Ljava/lang/IllegalStateException;
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "code < 0: "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget v2, p0, Lokhttp3/Response$Builder;->code:I
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v1
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_2
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "protocol == null"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_3
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "request == null"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public cacheResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
- .locals 1
- if-eqz p1, :cond_0
- const-string v0, "cacheResponse"
- invoke-direct {p0, v0, p1}, Lokhttp3/Response$Builder;->checkSupportResponse(Ljava/lang/String;Lokhttp3/Response;)V
- :cond_0
- iput-object p1, p0, Lokhttp3/Response$Builder;->cacheResponse:Lokhttp3/Response;
- return-object p0
- .end method
- .method public code(I)Lokhttp3/Response$Builder;
- .locals 0
- iput p1, p0, Lokhttp3/Response$Builder;->code:I
- return-object p0
- .end method
- .method public handshake(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;
- .locals 0
- iput-object p1, p0, Lokhttp3/Response$Builder;->handshake:Lokhttp3/Handshake;
- return-object p0
- .end method
- .method public header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0, p1, p2}, Lokhttp3/Headers$Builder;->set(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
- .locals 0
- invoke-virtual {p1}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public message(Ljava/lang/String;)Lokhttp3/Response$Builder;
- .locals 0
- iput-object p1, p0, Lokhttp3/Response$Builder;->message:Ljava/lang/String;
- return-object p0
- .end method
- .method public networkResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
- .locals 1
- if-eqz p1, :cond_0
- const-string v0, "networkResponse"
- invoke-direct {p0, v0, p1}, Lokhttp3/Response$Builder;->checkSupportResponse(Ljava/lang/String;Lokhttp3/Response;)V
- :cond_0
- iput-object p1, p0, Lokhttp3/Response$Builder;->networkResponse:Lokhttp3/Response;
- return-object p0
- .end method
- .method public priorResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
- .locals 0
- if-eqz p1, :cond_0
- invoke-direct {p0, p1}, Lokhttp3/Response$Builder;->checkPriorResponse(Lokhttp3/Response;)V
- :cond_0
- iput-object p1, p0, Lokhttp3/Response$Builder;->priorResponse:Lokhttp3/Response;
- return-object p0
- .end method
- .method public protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
- .locals 0
- iput-object p1, p0, Lokhttp3/Response$Builder;->protocol:Lokhttp3/Protocol;
- return-object p0
- .end method
- .method public receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
- .locals 0
- iput-wide p1, p0, Lokhttp3/Response$Builder;->receivedResponseAtMillis:J
- return-object p0
- .end method
- .method public removeHeader(Ljava/lang/String;)Lokhttp3/Response$Builder;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0, p1}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
- .locals 0
- iput-object p1, p0, Lokhttp3/Response$Builder;->request:Lokhttp3/Request;
- return-object p0
- .end method
- .method public sentRequestAtMillis(J)Lokhttp3/Response$Builder;
- .locals 0
- iput-wide p1, p0, Lokhttp3/Response$Builder;->sentRequestAtMillis:J
- return-object p0
- .end method
|