Bob, Cool - that's what I was thinking was the "right" way to do it, but was just curious if there was another way
Patrick On Oct 21, 7:58 am, Bob Lee <crazybob...@gmail.com> wrote: > On Wed, Oct 21, 2009 at 9:31 AM, Patrick Lightbody > <patr...@lightbody.net>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 google-guice@googlegroups.com To unsubscribe from this group, send email to google-guice+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---