On Sunday, January 9, 2011 5:34:12 PM UTC+1, zixzigma wrote:
>
> does it mean that I can just use the code below ?
>
> @Inject
> MyObject(SomeObject thisWillBeAnInitializedInstance,
> Provider<MyActivity1>
> thisWillBeAProvider) {
>
>
> and it works out of the box ?
>
Yes!
and what is the correct way to configure it ?
>
Nothing special!
If GIN is able to inject an instance of a given class X, it's able to inject
a Provider<X>.
bind(MyActivity.class).toProvider(MyActivityProvider.class).
>
> and although I have bound only MyActivity.class to the provider,
> it also provides MyActivity1, MyActivity2 and "? extends MyActivity" ?
No!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.