-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support mixed injection and manual wiring #231
Comments
From limpbizkit on August 07, 2008 18:44:10 We discussed this today, and our best idea is to have an |
From limpbizkit on August 07, 2008 18:46:01 I mistyped: I meant a toConstructor() bind target. |
From sven.linstaedt on August 08, 2008 08:06:51 Just for clarification: Are you discussing
|
From limpbizkit on November 28, 2008 11:30:35 Plan: Complications: SPI Considerations: Syntactic Sugar: |
From limpbizkit on December 24, 2008 20:30:47 Deferred to the next release so we can work out the scoping issues. Labels: -Milestone-Release2.0 |
From limpbizkit on June 21, 2009 11:21:49 We've implemented toConstructor() bindings: It's possible to easily implement |
From sberlin on May 23, 2010 05:26:03 Issue 485 has been merged into this issue. |
From sberlin on May 23, 2010 07:21:19 toConstructor itself solves the TurkeyBacon problem as described public class BritishModule extends AbstractModule { .. a little bit unwieldy code-wise, but it works. Is In other words, instead of toConstructor being syntactic sugar for It'd be pretty easy to hack up, either way. |
From sberlin on May 23, 2010 07:32:01 FYI - I committed a test in r1166 that asserts that toConstructor solves the |
From sberlin on May 23, 2010 08:18:54 Thinking about this some more... it looks like attempts to introduce I think we're safest adding an easy-to-use "find the right constuctor" method, I'm for closing this as "will not fix" -- please chime in if you think otherwise! |
From sberlin on October 24, 2010 17:15:54 Closing as fixed because toConstructor allows this with some configuration (bind your object with toConstructor and a custom Status: Fixed |
From crazyboblee on August 06, 2008 20:57:09
There are cases where you want most members injected in a given class and
then to do some manual wiring (you may have a couple different bindings
that are wired slightly differently). Right now, it's an all or nothing
proposition.
For a class FooImpl, I should be able to bind a provider to FooImpl, and in
the provider, I should be able to get an injected instance of FooImpl that
I can further work on and return.
Original issue: http://code.google.com/p/google-guice/issues/detail?id=231
The text was updated successfully, but these errors were encountered: