Hi all,
I would like to know how can I had the same type of feature of automatic
bindings of Providers (guice or javax-inject) for Suppliers (guave or java
8)?
I would like to do something like that:
public class MyModule extends AbstractModule {
@Override
protected void configure() {
bind(MyInterface.class).to(MyImpl.class);
}
}
And then be able to indefferently inject it in the following use cases
without extra work:
class MyClient {
private final Provider<MyInterface> myInterfaceProvider;
private final Supplier<MyInterface> myInterfaceSupplier;
@Inject
MyClient(Provider<MyInterface> myInterfaceProvider,
Supplier<MyInterface> myInterfaceSupplier) {
...
}
...
}
Thanks,
Romain.
--
You received this message because you are subscribed to the Google Groups
"google-guice" 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.
For more options, visit https://groups.google.com/groups/opt_out.