xiaodududu / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Explicitly document that assisted inject can create several types with one single factory interface #591

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dears,

In the current javadoc (version 3.0rc2), I couldn't find any mention of the 
fact that the FactoryModuleBuilder can accept to build several different types.

For instance, it's not clear that we can do the following:

public interface FruitFactory {
  Apple createApple(Color color);
  Orange createOrange(Acidity acidity);
  Pear createPear(Color color);
}

I really had to test it myself in order to be sure... then I saw that it's 
present in the wiki. However, I really think that this feature, not so easy for 
those coming from Guice 2 (since Guice 2 had this restriction), should be 
written down in the javadoc, not only in the wiki.

Original issue reported on code.google.com by ogregoire on 19 Jan 2011 at 2:35

GoogleCodeExporter commented 9 years ago
fixed in r1491

Original comment by sberlin on 6 Feb 2011 at 6:00