Status: New
Owner: ----

New issue 790 by [email protected]: Binding assisted inject factory to a named annotation
http://code.google.com/p/google-guice/issues/detail?id=790

Description of the issue:

1)I have created a Factory using Assisted Inject.
2)I want this factory to be bound to a named annotation.

Current solution
bind(MyFactory.class).annotatedWith(Names.named("MyFactoryTest")) .toProvider(FactoryProvider.newFactory(MyFactory.class, MyFactoryTest.class));

Issue:

FactoryProvider is a deprecated class, and FactoryModuleBuilder class should be used, like below.

Module factoryModuleBuilder = new FactoryModuleBuilder() implement(MyInterface.class, MyInterfaceTest.class) .build(MyFactory.class);

install(factoryModuleBuilder);

I would like to know how to get through this. I am not sure if this is an issue, but I did not find a forum to post my question. Apologies for the inconvenience.

Steps to reproduce:
1.
2.
3.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to