@Provider doesn't exist. Provider<T> is an interface. I think you mean
@Provides, which is part of Guice's module configuration system.
Think of it this way. @Inject declares a dependency. It says "Hey,
Guice, I need this thing here." @Provides doesn't happen in your normal
client code, but in your configuration code - your Modules. It's where
you say, "Hey, Guice, if someone needs this thing here in my return
type, execute this method to create it."
Christian.
On 15 Jan 2014, at 14:58, guice_learner wrote:
Whats the differnce between @Provider and @inject difference
Can some one let me know which one should be used for which scenario
Thanks for your help!
--
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.
Christian Gruber :: Google, Inc. :: Java Core Libraries :: Dependency
Injection
email: [email protected] :::: mobile: +1 (646) 807-9839
--
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.