package cruzgtug.example.guice; import com.google.inject.Guice; import com.google.inject.Injector; public class HelloExample { public static void main(String[] args) { /* * Guice.createInjector() takes your Modules, and returns a new Injector * instance. Most applications will call this method exactly once, in their * main() method. */ Injector injector = Guice.createInjector(new HelloModule()); /* * Now that we've got the injector, we can build implementation objects. */ Hello helloProcessor = injector.getInstance(Hello.class); helloProcessor.hello(); } }