Comment by [email protected]:
In the very last code snippet on the Motivation page, we have the
following...
`BillingService billingService =
injector.getInstance(BillingService.class);`
...which means (thanks to the binding) that the actual type of
billingService is RealBillingService, right?
However, in the very last code snippet on _this_ page, we have the
following...
`RealBillingService billingService =
injector.getInstance(RealBillingService.class);`
...but we haven't bound RealBillingService.class to anything in
BillingModule, and we've only injected the RealBillingService constructor
(not the entire RealBillingService class). Why does this work, and what are
the differences between these two approaches?
For more information:
https://code.google.com/p/google-guice/wiki/GettingStarted
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" 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-dev.
For more options, visit https://groups.google.com/groups/opt_out.