Comment #4 on issue 346 by aragos: AssistedInject: Multi-type factories
http://code.google.com/p/google-guice/issues/detail?id=346
After some discussion, we changed the configuration interface to use a
module which
you can install:
configure() {
install(new FactoryModuleBuilder()
.implement(Animal.class, Dog.class)
.implement(Animal.class, Names.named("cat"), Cat.class)
.build(AnimalFactory.class));
}
or, if you have implementation types returned in your factory as in your
example:
install(new FactoryModuleBuilder().build(AnimalFactory.class));
Take a look at the FactoryModuleBuilder in the code review (latest patch
set) to see
all configuration options.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---