Search   Feed   Browse   Add
Feed items 1 - 1 of 1 for July 2008

Guice, main and startup configuration flags - July 10, 2008

Here is a small trick we use in an in-house program wired with Google Guice. The goal is to pick the wiring configuration from the command-line without too many contortions. The idea is to use enums to represent the wiring, and using the command-line to pick the enum. Thus: enum WhichOne Uses module "A", defined elsewhere. ONE(new ModuleA()), Uses module "A" and "B", defined elsewhere. TWO(new ModuleA(), new ModuleB()); private final Module module; WhichOne(final...
http://binkley.blogspot.com/2008/07/guice-main-and-startup-configuration.html
Available Archives
- May (3 items)
- June (1 item)
- July (1 item)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact