Discussion:
How do I retrieve an object injected through Guice
Arul Prakasam Narasimhan
2018-08-29 16:56:14 UTC
Permalink
Under my Module Class, I inject objects

@Override
protected void configure() {
bind(AuthorizationService.class).asEagerSingleton();
bind(BasicAuthenticationService.class).asEagerSingleton();
bind(BasicCredentialsHashingService.class).asEagerSingleton();
}

Now how do I retrieve these objects if required inside my Plugin Class.
I need to retrieve these objects, add another property value to it.

Thanks
Arul.
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/f347df99-64c4-4aed-9c2b-5844fa569e21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stephan Classen
2018-08-29 17:46:18 UTC
Permalink
Checkout the tutorial in the guice github wiki:
https://github.com/google/guice/wiki/GettingStarted
Post by Arul Prakasam Narasimhan
Under my Module Class, I inject objects
@Override
protected void configure() {
bind(AuthorizationService.class).asEagerSingleton();
bind(BasicAuthenticationService.class).asEagerSingleton();
bind(BasicCredentialsHashingService.class).asEagerSingleton();
}
Now how do I retrieve these objects if required inside my Plugin Class.
I need to retrieve these objects, add another property value to it.
Thanks
Arul.
--
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
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/f347df99-64c4-4aed-9c2b-5844fa569e21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/9D691758-DC58-4A25-A942-78E35FA38282%40gmx.ch.
For more options, visit https://groups.google.com/d/optout.
Loading...