On Wed, Oct 21, 2009 at 9:31 AM, Patrick Lightbody <[email protected]>wrote:
> But then I was thinking, it'd be cool if I could somehow @Inject this:
>
> @Named("foo.vm") Provider<Template> templateProvider
> ...
> Template template = templateProvider.get();
>
> Then my provider would somehow be able to detect that it should be
> associated with "foo.vm" and return the right value.
>
> Is something like this possible?
>
We usually encourage developers to bind things explicitly up front. That
way, we can catch errors ASAP. In this case, you might consider iterating
over all of your .vm files and creating bindings to them (I'd probably drop
the ".vm" part).
Bob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---