title: Generic list with GWT AsyncDataProvider
body: <p>I have a GWT application where I need to work with multiple data types which are similar, but not quite the same. I want to display them using a CellList backed by an AsyncDataProvider. I'm trying to avoid creating multiple CellLists/AsyncDataProviders, so I'm trying to do this in a generic manner. However, I can't seem to figure out how to do this.</p>
  
  <p>I've tried:</p>
  
  <pre><code>private AsyncDataProvider&lt;MyInterface&gt; myDataProvider = new AsyncDataProvider&lt;MyInterface&gt;() {
              @Override
              protected void onRangeChanged(final HasData&lt;MyInterface&gt; display) {
  
                  AsyncCallback&lt;Type&gt; callback = new AsyncCallback&lt;Type&gt;() {
                      @Override
                      public void onFailure(Throwable t) {
                          myDataProvider.updateRowData(0, new ArrayList&lt;MyImplementation&gt;());    
                      }
                      @Override
                      public void onSuccess(Type result) {
                          //some success logic               
                      }
                  };
  }
  </code></pre>
  
  <p>Which doesn't work because a collection of MyImplementation can't be substituted for a collection of MyInterface.</p>
  
  <p>I've also tried:</p>
  
  <pre><code>private AsyncDataProvider&lt;? extends MyInterface&gt; myDataProvider = new AsyncDataProvider&lt;MyInterface&gt;() {
                  @Override
                  protected void onRangeChanged(final HasData&lt;MyInterface&gt; display) {
  
                      AsyncCallback&lt;Type&gt; callback = new AsyncCallback&lt;Type&gt;() {
                          @Override
                          public void onFailure(Throwable t) {
                              myDataProvider.updateRowData(0, new ArrayList&lt;MyImplementation&gt;());    
                          }
                          @Override
                          public void onSuccess(Type result) {
                              //some success logic               
                          }
                      };
      }
  </code></pre>
  
  <p>But I get the error: <code>"The method updateRowData(int, List&lt;capture#2-of ? extends MyInterface&gt;) in the type AsyncDataProvider&lt;capture#2-of ? extends MyInterface&gt; is not applicable for the arguments (int, ArrayList&lt;MyImplementation&gt;)"</code></p>
  
  <p>Any ideas? Is it possible to do what I'm trying to do. There are alternatives, such as manually converting them all to a common type, but it just seems like a good use case for handling things in a generic fashion.</p>