Comment #10 on issue 519 by [email protected]: toProvider() should continue
to use Guice's Provider, not JSR-330's
http://code.google.com/p/google-guice/issues/detail?id=519
Other use cases include:
- the user shouldn't have to worry which provider they implemented when
they want to call bind(..).toProvider(MyProvider.class), (or new
TypeLiteral<MyProvider<SomeType>)(){}, or Key.get(MyProvider.class)).
- the user shouldn't have to worry about which provider was implemented
when they want to test a class that uses Provider<Foo> in its constructor.
- the user should be able to write all their code (except for Modules, but
including custom locaters/providers) using the jsr-330 jar
I agree about the arguments for allowing toProvider(j.i.Provider) are the
same as scope(j.i.Provider), and think it would be useful... but that
binary compatible outweighs the importance in these cases. Fortunately,
binary compatible remains the same with the other changes (I think).
--
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.