title: Java Generics Error: inconvertible types from command line compiler
body: <p>I have some Guice binding code using generics that compiles and functions fine from Eclipse's compiler, but not from the Java (command-line) compiler.  I upgraded to the latest (1.7.0_01) Java SDK but still get the following error.</p>
  
  <pre><code>[error] ...\BindCategorySelectorActivity.java:42: error: inconvertible types
  [error]                                 (Class&lt;? extends ListAdapterDataProvider&lt;Row&lt;? extends DatabaseItem&gt;&gt;&gt;) CategoryDataProvider.class);
  [error]                                                                                                                             ^
  [error]   required: Class&lt;? extends ListAdapterDataProvider&lt;Row&lt;? extends DatabaseItem&gt;&gt;&gt;
  [error]   found:    Class&lt;CategoryDataProvider&gt;
  [error] 1 error
  [error] {file:/.../compile:compile: javac returned nonzero exit code
  </code></pre>
  
  <p>Relevant code:</p>
  
  <pre><code>public interface Category extends DatabaseItem {}
  public class CategoryDataProvider implements 
   ListAdapterDataProvider&lt;Row&lt;Category&gt;&gt; {}
  public class BindListViewHandlerWithSpecificProvider extends AbstractModule {
      public BindListViewHandlerWithSpecificProvider(
       Class&lt;? extends ListAdapterDataProvider&lt;Row&lt;? extends DatabaseItem&gt;&gt;&gt;
        dataProviderClass) {}
  }
  
  @SuppressWarnings("unchecked")
  // Error happens here:
  final BindListViewHandlerWithSpecificProvider 
   bindListViewHandlerWithSpecificProvider = 
    new BindListViewHandlerWithSpecificProvider(
     (Class&lt;? extends ListAdapterDataProvider&lt;Row&lt;? extends DatabaseItem&gt;&gt;&gt;)
      CategoryDataProvider.class);
  </code></pre>