Result.smali
4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
.class public final Lretrofit2/adapter/rxjava2/Result;
.super Ljava/lang/Object;
.source "Result.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private final error:Ljava/lang/Throwable;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private final response:Lretrofit2/Response;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lretrofit2/Response<",
"TT;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
# direct methods
.method private constructor <init>(Lretrofit2/Response;Ljava/lang/Throwable;)V
.locals 0
.param p1 # Lretrofit2/Response;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.param p2 # Ljava/lang/Throwable;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Response<",
"TT;>;",
"Ljava/lang/Throwable;",
")V"
}
.end annotation
.line 39
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 40
iput-object p1, p0, Lretrofit2/adapter/rxjava2/Result;->response:Lretrofit2/Response;
.line 41
iput-object p2, p0, Lretrofit2/adapter/rxjava2/Result;->error:Ljava/lang/Throwable;
return-void
.end method
.method public static error(Ljava/lang/Throwable;)Lretrofit2/adapter/rxjava2/Result;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Throwable;",
")",
"Lretrofit2/adapter/rxjava2/Result<",
"TT;>;"
}
.end annotation
if-eqz p0, :cond_0
.line 27
new-instance v0, Lretrofit2/adapter/rxjava2/Result;
const/4 v1, 0x0
invoke-direct {v0, v1, p0}, Lretrofit2/adapter/rxjava2/Result;-><init>(Lretrofit2/Response;Ljava/lang/Throwable;)V
return-object v0
.line 26
:cond_0
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "error == null"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static response(Lretrofit2/Response;)Lretrofit2/adapter/rxjava2/Result;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lretrofit2/Response<",
"TT;>;)",
"Lretrofit2/adapter/rxjava2/Result<",
"TT;>;"
}
.end annotation
if-eqz p0, :cond_0
.line 33
new-instance v0, Lretrofit2/adapter/rxjava2/Result;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lretrofit2/adapter/rxjava2/Result;-><init>(Lretrofit2/Response;Ljava/lang/Throwable;)V
return-object v0
.line 32
:cond_0
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "response == null"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
# virtual methods
.method public error()Ljava/lang/Throwable;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 61
iget-object v0, p0, Lretrofit2/adapter/rxjava2/Result;->error:Ljava/lang/Throwable;
return-object v0
.end method
.method public isError()Z
.locals 1
.line 66
iget-object v0, p0, Lretrofit2/adapter/rxjava2/Result;->error:Ljava/lang/Throwable;
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public response()Lretrofit2/Response;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lretrofit2/Response<",
"TT;>;"
}
.end annotation
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 49
iget-object v0, p0, Lretrofit2/adapter/rxjava2/Result;->response:Lretrofit2/Response;
return-object v0
.end method