You could think of this as a singleton. But:
- This rules out constructor injection
- You're bypassing Guice's
real scoping mechanism
- Doing work in modules not related to configuration itself is a bad practice.
You should consider using asEagerSingleton or in(Singleton.class) instead.
IMO, the only valid use for toInstance is binding constants (to get some extra help from the compiler)
Robbie