Comment by [email protected]:

Binding annotations (also known as Qualifiers in JSR330) let you bind multiple implementations of the same interface and distinguish between them. While it may look that depending on "@PayPal CreditCardProcessor" is the same as depending directly on the PayPalCreditCardProcessor implementation, it isn't because using the interface means that I can bind a different implementation to "@PayPal CreditCardProcessor" for testing purposes - or for additional auditing purposes, etc.

Depending on PayPalCreditCardProcessor directly means I can only inject that, or a sub-class of it, which is a much tighter constraint.

For more information:
http://code.google.com/p/google-guice/wiki/BindingAnnotations

--
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.

Reply via email to