Hi Kevin,
I am not so concerned about @Inject annotations or runtime costs so
much as "API pollution". For example, I worry users would be off-put by
having to do:
Injector.getClass(Toolkit.class);
instead of
Toolkit.getDefaultToolkit()
Are you suggesting that I should expose the latter method that invokes
the former internally? From a usability point of view, factory methods
look a lot nicer coming off the class than having to go through an extra
level of indirection (Injector)...
Gili
Kevin Bourrillion wrote:
> The goal of Guice is for your code to not truly depend on it. However,
> the fact that @Inject and interfaces like Provider are not in the JDK --
> yet! <
http://jcp.org/en/jsr/detail?id=330> -- means you do end up having