2009/4/10 irium <[email protected]>: > +1 for that. I'm also need for similar feature and it will be very > useful to be implemented in Guice.
Agreed - I think its a great idea. A binding annotation that has values can be bound via its type or via an exact combination of values - but there's currently no way if you bind to a type of annotations to get the actual values and use those in your provider method. This came up recently on the guiceyfruit list... http://groups.google.com/group/guiceyfruit/browse_thread/thread/da948ae7d48bb99 One idea to implement this without adding new APIs, is to allow details of an injection point to be injected into providers. e.g. to allow the Key/InjectionPoint to be injected into a Provider. As well as the annotation instance; a provider might want to access the Member as well (e.g. to use the name of the field/method as an extra default value - for example for lookups into registries and whatnot). I was wondering if InjectionPoint was a natural choice for something we might want to make injectable into a Provider? Doesn't quite work if a parameter to a constructor/method has annotations etc but at least it would let providers see the member name & other annotations etc? -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. 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 -~----------~----~----~----~------~----~------~--~---
