If you want to inject a Map, you can use MapBinder http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/multibindings/MapBinder.html
On Mon, May 10, 2010 at 4:04 PM, Christoph <[email protected]> wrote: > Hi all, > What is the best way, if guice should create an instance of a class > that has a non-empty constructor, e.g.: > class A { > private final Map<String> map; > public A(Map<String> test) { > this.map = test; > } > > Guice needs empty constructors for injection... > > -- > 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]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- 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.
