Bob, thanks.

Guiceyfruit - cool, will look into it. I hope it is compatible with Guice 
3.0 and works with Java SE.

I didn't quite follow what said here:

You typically shouldn't use Injector directly after the initial lookup. When 
you depend on types, Guice can check your dependencies up front. When you 
get objects directly form the Injector, you don't find out about missing 
deps until run time. 

The Guice example 
(http://code.google.com/p/google-guice/wiki/GettingStarted) does exactly 
that - accessing from Injector:

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 BillingModule());

    /*
     * Now that we've got the injector, we can build objects.
     */
    RealBillingService billingService = 
injector.getInstance(RealBillingService.class);
    ...
  }

How else do you get the injectors started and create the bound services?

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/nWyxZqpM0VgJ.
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.

Reply via email to