Yesterday, I needed to have a binding available to a Provider without exposing that binding to the rest of the project. Our team has recently discovered the wonderful anti-pattern of injecting the Commons Configuration instance for the project all over the place. I helped to clean this up in favor of simply injecting the specific values where they were needed. However, there was one place in the project that still needed the whole object. To prevent future developers (myself included) from repeating the sins of our past, I didn't want to expose the binding to Configuration. So, I found a little pattern to keep things private. I've blogged it here:
http://testinfected.blogspot.com/2008/12/private-bindings-in-guice.html I would appreciate any feedback and pointers if there is a better way to do this. Thanks. Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" 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?hl=en -~----------~----~----~----~------~----~------~--~---
