Status: New
Owner: ----
New issue 537 by mathieu.carbou: Add
bind(...).toProvider(javax.inject.Provider instance);
http://code.google.com/p/google-guice/issues/detail?id=537
Supposing to deal with JSR330 Providers, we cannot write:
class MyProvider implements javax.inject.Provider {}
binder.bind(...).toProvider(new MyProvider(...));
since toProvider only accepts Guices's providers.
Could you please add a method accepting jsr330 providers ?
public BindingBuilder<T> toProvider(final javax.inject.Provider<? extends
T> provider) {
return toProvider(new Provider<? extends T>() {
public T get(){ return provider.get(); }
});
}
--
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.