On Jan 4, 10:42 am, Sam Berlin <[email protected]> wrote: > The best way to see how to use toConstructor right now would be to look at > the tests in Guice. See > <http://code.google.com/p/google-guice/source/browse/trunk/test/com/go...> > for some examples. > > The interface/class toConstructor belongs to is kind of immaterial because > of the way the Guice API is written. It's just another option of how to > bind something from a prior bind(..) call. FWIW, it's on the > LinkedBindingBuilder interface. Javadocs don't really go well on DSL-style > APIs, though. > > Sam
Well, I don't find it to be immaterial. I might be old-fashioned, but I find javadoc to be a very convenient tool for understanding how to use an interface or class. :) Fluent/DSL style or not, I'm very comfortable if I can see the javadoc. But in this case, since I hadn't actually downloaded and added guice to a project and brought it up in my ide, I was looking at the javadoc specifically to see if I could find the facility you described. I couldn't, because it's not there. I couldn't find it on the LinkedBindingBuilder interface, looking here: http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/binder/LinkedBindingBuilder.html. The url path says trunk, so my assumption is that this is the trunk which will build to guice 2.1. I just downloaded guice 2.0 and added it to my IDE, but the IDE doesn't see the toConstructor() method either. Perhaps I'm on the wrong version? Thanks, Jim -- 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.
