O'Reilly logo

Google Guice: Agile Lightweight Dependency Injection Framework by Robbie Vanbrabant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3: From Journeyman to Bob

Now that you're familiar with the Guice basics, you're ready to go become a Guice master: scope like no one has scoped before; the world is at your Injector; the annotations lay at your feet, and so on—unless, of course, you skipped the previous chapter, you rascal.

Seriously, although you have a good understanding of what Guice is about, you still need that little bit of extra know-how to get going. Not everything you code against will implement an interface or will have a DI-style design, and you need to be prepared to deal with that. Also, Guice has some handy shortcuts when it comes to, for example, handling constant values or injecting configuration from a properties file. In this chapter, I'll stick all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required