Response.smali
.class public final Lretrofit2/Response;
.super Ljava/lang/Object;
.source "Response.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private final body:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
.field private final errorBody:Lokhttp3/aq;
.field private final rawResponse:Lokhttp3/ao;
# direct methods
.method private constructor <init>(Lokhttp3/ao;Ljava/lang/Object;Lokhttp3/aq;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lokhttp3/ao;",
"TT;",
"Lokhttp3/aq;",
")V"
}
.end annotation
.prologue
.line 94
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 95
iput-object p1, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
.line 96
iput-object p2, p0, Lretrofit2/Response;->body:Ljava/lang/Object;
.line 97
iput-object p3, p0, Lretrofit2/Response;->errorBody:Lokhttp3/aq;
.line 98
return-void
.end method
.method public static error(ILokhttp3/aq;)Lretrofit2/Response;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(I",
"Lokhttp3/aq;",
")",
"Lretrofit2/Response",
"<TT;>;"
}
.end annotation
.prologue
.line 70
const/16 v0, 0x190
if-ge p0, v0, :cond_19
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "code < 400: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 71
:cond_19
new-instance v0, Lokhttp3/ap;
invoke-direct {v0}, Lokhttp3/ap;-><init>()V
.line 5342
iput p0, v0, Lokhttp3/ap;->code:I
.line 72
const-string v1, "Response.error()"
.line 5347
iput-object v1, v0, Lokhttp3/ap;->message:Ljava/lang/String;
.line 73
sget-object v1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
.line 6337
iput-object v1, v0, Lokhttp3/ap;->bWJ:Lokhttp3/Protocol;
.line 74
new-instance v1, Lokhttp3/am;
invoke-direct {v1}, Lokhttp3/am;-><init>()V
const-string v2, "http://localhost/"
.line 75
invoke-virtual {v1, v2}, Lokhttp3/am;->hJ(Ljava/lang/String;)Lokhttp3/am;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/am;->build()Lokhttp3/al;
move-result-object v1
.line 7332
iput-object v1, v0, Lokhttp3/ap;->bWI:Lokhttp3/al;
.line 76
invoke-virtual {v0}, Lokhttp3/ap;->RB()Lokhttp3/ao;
move-result-object v0
.line 71
invoke-static {p1, v0}, Lretrofit2/Response;->error(Lokhttp3/aq;Lokhttp3/ao;)Lretrofit2/Response;
move-result-object v0
return-object v0
.end method
.method public static error(Lokhttp3/aq;Lokhttp3/ao;)Lretrofit2/Response;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lokhttp3/aq;",
"Lokhttp3/ao;",
")",
"Lretrofit2/Response",
"<TT;>;"
}
.end annotation
.prologue
.line 81
const-string v0, "body == null"
invoke-static {p0, v0}, Lretrofit2/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 82
const-string v0, "rawResponse == null"
invoke-static {p1, v0}, Lretrofit2/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 83
invoke-virtual {p1}, Lokhttp3/ao;->isSuccessful()Z
move-result v0
if-eqz v0, :cond_18
.line 84
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "rawResponse should not be successful response"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 86
:cond_18
new-instance v0, Lretrofit2/Response;
const/4 v1, 0x0
invoke-direct {v0, p1, v1, p0}, Lretrofit2/Response;-><init>(Lokhttp3/ao;Ljava/lang/Object;Lokhttp3/aq;)V
return-object v0
.end method
.method public static success(Ljava/lang/Object;)Lretrofit2/Response;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)",
"Lretrofit2/Response",
"<TT;>;"
}
.end annotation
.prologue
.line 30
new-instance v0, Lokhttp3/ap;
invoke-direct {v0}, Lokhttp3/ap;-><init>()V
.line 1342
const/16 v1, 0xc8
iput v1, v0, Lokhttp3/ap;->code:I
.line 31
const-string v1, "OK"
.line 1347
iput-object v1, v0, Lokhttp3/ap;->message:Ljava/lang/String;
.line 32
sget-object v1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
.line 2337
iput-object v1, v0, Lokhttp3/ap;->bWJ:Lokhttp3/Protocol;
.line 33
new-instance v1, Lokhttp3/am;
invoke-direct {v1}, Lokhttp3/am;-><init>()V
const-string v2, "http://localhost/"
.line 34
invoke-virtual {v1, v2}, Lokhttp3/am;->hJ(Ljava/lang/String;)Lokhttp3/am;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/am;->build()Lokhttp3/al;
move-result-object v1
.line 3332
iput-object v1, v0, Lokhttp3/ap;->bWI:Lokhttp3/al;
.line 35
invoke-virtual {v0}, Lokhttp3/ap;->RB()Lokhttp3/ao;
move-result-object v0
.line 30
invoke-static {p0, v0}, Lretrofit2/Response;->success(Ljava/lang/Object;Lokhttp3/ao;)Lretrofit2/Response;
move-result-object v0
return-object v0
.end method
.method public static success(Ljava/lang/Object;Lokhttp3/ao;)Lretrofit2/Response;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Lokhttp3/ao;",
")",
"Lretrofit2/Response",
"<TT;>;"
}
.end annotation
.prologue
.line 58
const-string v0, "rawResponse == null"
invoke-static {p1, v0}, Lretrofit2/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 59
invoke-virtual {p1}, Lokhttp3/ao;->isSuccessful()Z
move-result v0
if-nez v0, :cond_13
.line 60
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "rawResponse must be successful response"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 62
:cond_13
new-instance v0, Lretrofit2/Response;
const/4 v1, 0x0
invoke-direct {v0, p1, p0, v1}, Lretrofit2/Response;-><init>(Lokhttp3/ao;Ljava/lang/Object;Lokhttp3/aq;)V
return-object v0
.end method
.method public static success(Ljava/lang/Object;Lokhttp3/z;)Lretrofit2/Response;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;",
"Lokhttp3/z;",
")",
"Lretrofit2/Response",
"<TT;>;"
}
.end annotation
.prologue
.line 43
const-string v0, "headers == null"
invoke-static {p1, v0}, Lretrofit2/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 44
new-instance v0, Lokhttp3/ap;
invoke-direct {v0}, Lokhttp3/ap;-><init>()V
.line 3342
const/16 v1, 0xc8
iput v1, v0, Lokhttp3/ap;->code:I
.line 45
const-string v1, "OK"
.line 3347
iput-object v1, v0, Lokhttp3/ap;->message:Ljava/lang/String;
.line 46
sget-object v1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
.line 4337
iput-object v1, v0, Lokhttp3/ap;->bWJ:Lokhttp3/Protocol;
.line 48
invoke-virtual {v0, p1}, Lokhttp3/ap;->c(Lokhttp3/z;)Lokhttp3/ap;
move-result-object v0
new-instance v1, Lokhttp3/am;
invoke-direct {v1}, Lokhttp3/am;-><init>()V
const-string v2, "http://localhost/"
.line 49
invoke-virtual {v1, v2}, Lokhttp3/am;->hJ(Ljava/lang/String;)Lokhttp3/am;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/am;->build()Lokhttp3/al;
move-result-object v1
.line 5332
iput-object v1, v0, Lokhttp3/ap;->bWI:Lokhttp3/al;
.line 50
invoke-virtual {v0}, Lokhttp3/ap;->RB()Lokhttp3/ao;
move-result-object v0
.line 44
invoke-static {p0, v0}, Lretrofit2/Response;->success(Ljava/lang/Object;Lokhttp3/ao;)Lretrofit2/Response;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public final body()Ljava/lang/Object;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.prologue
.line 127
iget-object v0, p0, Lretrofit2/Response;->body:Ljava/lang/Object;
return-object v0
.end method
.method public final code()I
.registers 2
.prologue
.line 107
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
.line 8098
iget v0, v0, Lokhttp3/ao;->code:I
.line 107
return v0
.end method
.method public final errorBody()Lokhttp3/aq;
.registers 2
.prologue
.line 132
iget-object v0, p0, Lretrofit2/Response;->errorBody:Lokhttp3/aq;
return-object v0
.end method
.method public final headers()Lokhttp3/z;
.registers 2
.prologue
.line 117
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
.line 8136
iget-object v0, v0, Lokhttp3/ao;->headers:Lokhttp3/z;
.line 117
return-object v0
.end method
.method public final isSuccessful()Z
.registers 2
.prologue
.line 122
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
invoke-virtual {v0}, Lokhttp3/ao;->isSuccessful()Z
move-result v0
return v0
.end method
.method public final message()Ljava/lang/String;
.registers 2
.prologue
.line 112
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
.line 8111
iget-object v0, v0, Lokhttp3/ao;->message:Ljava/lang/String;
.line 112
return-object v0
.end method
.method public final raw()Lokhttp3/ao;
.registers 2
.prologue
.line 102
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
return-object v0
.end method
.method public final toString()Ljava/lang/String;
.registers 2
.prologue
.line 136
iget-object v0, p0, Lretrofit2/Response;->rawResponse:Lokhttp3/ao;
invoke-virtual {v0}, Lokhttp3/ao;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method