Status: New
Owner: ----

New issue 758 by [email protected]: Increase support for optional injection.
http://code.google.com/p/google-guice/issues/detail?id=758

Setter/field injection already has the ability to say @Inject(optional = true), but it is impossible to reproduce this 'optional' behavior when messing with a TypeListener.

I'm writing a tiny piece of code that uses spring-security, but wanted to do injection via Guice. Many of the types have @Autowired setters and a few of them have "required = false", but technically would have those objects injected into them (from Spring).

So, to get this to work, I wanted to introduce a concept of an OptionalProvider which is a wrapper around a Provider that simply returns 'null' if the provider fails to supply a value.

Here's the code (it's a singular commit: 10 files, +116, -6):
https://code.google.com/r/natebauernfeind-google-guice/source/detail?r=472fc384bb6ade560188fee2d76ae90be3d233cb

Thanks,
Nate

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to