I ran into a problem with the above strategy today, which suggests it's not 
really the right way to do it.  So I'll renew my plea for any suggestions.

In a nutshell, what I'm after is a supported way to
 - In a Provider, get a Class object for the type being injected into (as 
in, if my provider being called to inject a parameter into an instance of 
Foo, I want to get Foo.class)
 - Look up an annotation on that *class* (not the parameter), or its 
Package (and similarly for interfaces and supertypes), and decide what the 
Provider should return based on that

The purpose is to allow legacy code which gets configuration from a variety 
of files to use injection with minimal code changes and minimal 
invasiveness - i.e. you just annotate the package to indicate where 
settings are loaded from, and the plumbing looks things up from the right 
place.

Any thoughts?

Thanks,

Tim

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/3OMFPpB9BXIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to