I'm new to Android. I have a task that download generic object from a server api and save it to a specific Object at runtime inside a loop.
Example: I have an Objects of Car, Bottle, Animal.
It is it possible to change this DownloadCallback<Object> during runtime?
  while (!finish) {
     retrofitHandler.downloadData("accounts", "1", new DownloadCallBack<Object>() {
         @Override
         public void onResponse(GenericResponse<Object> response) {
         }
         @Override
         public void onFailure(String response) {
         }
       });
  }
I know the Generic Class in set at Compile Time. but is this possible?
 
    