| | |
| | | import com.runt.open.mvvm.data.PageResult; |
| | | import com.runt.open.mvvm.retrofit.observable.HttpObserver; |
| | | |
| | | import java.lang.reflect.ParameterizedType; |
| | | import java.util.ArrayList; |
| | | |
| | | import io.reactivex.Observable; |
| | |
| | | * 数据请求 |
| | | */ |
| | | public void requestData(Observable<HttpApiResult<PageResult<D>>> observable){ |
| | | final ParameterizedType type = (ParameterizedType) this.getClass().getGenericSuperclass(); |
| | | Class<D> entityClass = (Class<D>) type.getActualTypeArguments()[0]; |
| | | httpObserverOn( observable, new PageHttpObserver()); |
| | | } |
| | | |