Skip to content
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

add convenience method for binding an instance to its own class #109

Closed
gissuebot opened this issue Jul 7, 2014 · 1 comment
Closed

Comments

@gissuebot
Copy link

From bslesinsky on May 25, 2007 22:37:25

I use tiny classes to implement flags, and often find myself writing this:

  bind(SomeClass.class).toInstance(new SomeClass(arg1));

It would be convenient to abbreviate it to:

  bindInstance(new SomeClass(arg1));

Original issue: http://code.google.com/p/google-guice/issues/detail?id=109

@gissuebot
Copy link
Author

From limpbizkit on June 04, 2008 23:23:05

I don't care for this - it encourages injecting concrete types, and toInstance(). http://publicobject.com/2007/06/thoughts-on-java-as-configuration.html

Status: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant