Comment by ffaber:
You would bind the Account and have that injected in. If you know your
customer at configure() time, then you'll know your Account.
As a simple example, you could have:
bind(Account.class)
.toProvider(new Provider<Account>() {
@Inject Customer customer;
@Override
public Account get() {
return customer.getAccount();
}
});
For more information:
http://code.google.com/p/google-guice/wiki/InjectOnlyDirectDependencies
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---