title: Java generics on an Android AsyncTask
body: <p>For an Android project I have a number of response tasks that I want to run async. The tasks differ only by the type of class that they produce. I'm new to Java generics, so I'm having a difficult time replacing the News.class with a generic T or ClassT (still working out the differences) could someone point out how I can factor this correctly?</p>
  
  <pre><code>private class AcquireResponseTask&lt;T&gt; extends AsyncTask&lt;RestClient, Void, T&gt; 
  {
       protected void onPostExecute(T news) 
       {
           process(news);
       }
  
      @Override
      protected T doInBackground(RestClient... rc)
      {
  
          return (T) DataToObject.acquireResponse(rc[0],
                  News.class);
      }
   }
  </code></pre>