title: Guice: "Could not find suitable constructor" when suitable constructor supplied in FactoryBuilder
body: <p>I'm using Guice for dependency injection, but I'm getting this error:</p>
  
  <pre><code>1) Could not find a suitable constructor in java.lang.Void. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
    at java.lang.Void.class(Void.java:44)
    while locating java.lang.Void
    at com.myfeed.algorithm.clusterer.tree.wrapper.ItemSourceTreeWrapperFactory.create(ItemSourceTreeWrapperFactory.java:1)
  </code></pre>
  
  <p>What's especially odd is that it mentions java.lang.Void.</p>
  
  <p>This is the <strong>module code</strong>: (I bind a class to itself, not an interface to a class)</p>
  
  <pre><code>install(new FactoryModuleBuilder().implement(
       new TypeLiteral&lt;ItemSourceTreeWrapper&lt;Document&gt;&gt;(){}, ItemSourceTreeWrapper.class
  ).build(new TypeLiteral&lt;ItemSourceTreeWrapperFactory&lt;Document&gt;&gt;(){}));
  </code></pre>
  
  <p>Here is <strong>ItemSourceTreeWrapper constructor</strong>:</p>
  
  <pre><code>@Inject
  public ItemSourceTreeWrapper(@Assisted Tree&lt;Item&lt;Source&gt;&gt; treeToWrap, @Assisted ItemGroup itemGroup, Itemizer&lt;Source&gt; itemizer, SourceItemConverterFactory sourceItemConverterFactory) {
      this.treeToWrap = treeToWrap;
      this.itemizer = itemizer;
      sourceItemConverter = sourceItemConverterFactory.create(itemGroup, itemizer);
  }
  </code></pre>
  
  <p>And here is the <strong>factory interface</strong>:</p>
  
  <pre><code>public interface ItemSourceTreeWrapperFactory&lt;Source&gt; {
      public void create(Tree&lt;Item&lt;Source&gt;&gt; treeToWrap, ItemGroup&lt;Source&gt; itemGroup);
  }
  </code></pre>