@@ -301,6 +301,19 @@ public void getAsOkHttpResponseAndParsed(TypeToken typeToken, OkHttpResponseAndP
301
301
ANRequestQueue .getInstance ().addRequest (this );
302
302
}
303
303
304
+ public void getAsOkHttpResponseAndObject (Class objectClass , OkHttpResponseAndParsedRequestListener parsedRequestListener ) {
305
+ this .mType = objectClass ;
306
+ this .mResponseType = ResponseType .PARSED ;
307
+ this .mOkHttpResponseAndParsedRequestListener = parsedRequestListener ;
308
+ ANRequestQueue .getInstance ().addRequest (this );
309
+ }
310
+
311
+ public void getAsOkHttpResponseAndObjectList (Class objectClass , OkHttpResponseAndParsedRequestListener parsedRequestListener ) {
312
+ this .mType = $Gson$Types .newParameterizedTypeWithOwner (null , List .class , objectClass );
313
+ this .mResponseType = ResponseType .PARSED ;
314
+ this .mOkHttpResponseAndParsedRequestListener = parsedRequestListener ;
315
+ ANRequestQueue .getInstance ().addRequest (this );
316
+ }
304
317
305
318
public void startDownload (DownloadListener downloadListener ) {
306
319
this .mDownloadListener = downloadListener ;
@@ -343,6 +356,18 @@ public ANResponse executeForParsed(TypeToken typeToken) {
343
356
return SynchronousCall .execute (this );
344
357
}
345
358
359
+ public ANResponse executeForObject (Class objectClass ) {
360
+ this .mType = objectClass ;
361
+ this .mResponseType = ResponseType .PARSED ;
362
+ return SynchronousCall .execute (this );
363
+ }
364
+
365
+ public ANResponse executeForObjectList (Class objectClass ) {
366
+ this .mType = $Gson$Types .newParameterizedTypeWithOwner (null , List .class , objectClass );
367
+ this .mResponseType = ResponseType .PARSED ;
368
+ return SynchronousCall .execute (this );
369
+ }
370
+
346
371
public ANResponse executeForDownload () {
347
372
return SynchronousCall .execute (this );
348
373
}
@@ -917,7 +942,7 @@ public T addPathParameter(String key, String value) {
917
942
918
943
@ Override
919
944
public T addPathParameter (Map <String , String > pathParameterMap ) {
920
- if (mPathParameterMap != null ) {
945
+ if (pathParameterMap != null ) {
921
946
mPathParameterMap .putAll (pathParameterMap );
922
947
}
923
948
return (T ) this ;
@@ -1131,7 +1156,7 @@ public T addPathParameter(String key, String value) {
1131
1156
1132
1157
@ Override
1133
1158
public T addPathParameter (Map <String , String > pathParameterMap ) {
1134
- if (mPathParameterMap != null ) {
1159
+ if (pathParameterMap != null ) {
1135
1160
mPathParameterMap .putAll (pathParameterMap );
1136
1161
}
1137
1162
return (T ) this ;
@@ -1399,7 +1424,7 @@ public T addPathParameter(String key, String value) {
1399
1424
1400
1425
@ Override
1401
1426
public T addPathParameter (Map <String , String > pathParameterMap ) {
1402
- if (mPathParameterMap != null ) {
1427
+ if (pathParameterMap != null ) {
1403
1428
mPathParameterMap .putAll (pathParameterMap );
1404
1429
}
1405
1430
return (T ) this ;
@@ -1538,7 +1563,7 @@ public T addPathParameter(String key, String value) {
1538
1563
1539
1564
@ Override
1540
1565
public T addPathParameter (Map <String , String > pathParameterMap ) {
1541
- if (mPathParameterMap != null ) {
1566
+ if (pathParameterMap != null ) {
1542
1567
mPathParameterMap .putAll (pathParameterMap );
1543
1568
}
1544
1569
return (T ) this ;
0 commit comments