There's no built-in way to do this. Depending on the scope, it's maybe possible to use TypeListeners and custom injections<https://code.google.com/p/google-guice/wiki/CustomInjections>to do this.
sam On Sun, Oct 27, 2013 at 11:19 AM, Gili <[email protected]> wrote: > I am trying to integrate two DI systems: Guice and HK2. I'd like to > implement the following behavior: > > 1. When Injector.getInstance() is invoked, iterate through all bindings > (as it normally does). > 2. If no match is found, ask HK2 to inject the type. > 3. If no match is found, throw an error. > > I'm not sure how to implement step #2. Because we lack this behavior, > we're stuck with an ugly @HK2Inject as seen here: > https://hk2.java.net/guice-bridge/index.html > > Any ideas? > > Gili > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. For more options, visit https://groups.google.com/groups/opt_out.
