> Also, the modules I'm consuming are provided by application developers > who use my framework. I've published in the API they need to produce > Guice modules. I'm not willing to be more restrictive and tell them to > use specific syntax, that would reflect poorly on my framework. > You could provide an abstract Guice module to hide the tedious binding procedure from developers using your framework. See for example:
https://github.com/ArcBees/GWTP/blob/master/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/gin/AbstractPresenterModule.java#L49 On 11/04/2015 12:11 AM, Jamie Astin wrote: > > Hi Thomas, > > > Thanks for taking the time to reply. The output posted is the total > output from my test. > > > Therefore, Guice is only observing one provision. Thus, its not like > theres a second provision I could inspect. > > > Also, the modules I'm consuming are provided by application developers > who use my framework. I've published in the API they need to produce > Guice modules. I'm not willing to be more restrictive and tell them to > use specific syntax, that would reflect poorly on my framework. > > > If the two separate bindings do work, this surely suggests a Guice > bug? As far as I can tell your two-liner should be functionally > equivalent to my on-liner? > > > I'll try the two-liner tomorrow. My intention would be to debug + > raise a bug / pull request if it actually fixes the underlying > problem... Unless someone can explain the disparity between the > one/two-liner? > > > Thanks again! > > > > On Nov 3, 2015 21:17, "Thomas Broyer" <[email protected] > <mailto:[email protected]>> wrote: > > The Car binding isn't a Singleton; the Vehicle one is. Using > separate bind() calls might do what you want: > > > > bind(Vehicle.class).to(Car.class); > > bind(Car.class).in(Singleton.class); > > > > (I don't know listeners much so can't really help beyond the above) > > > > -- > > You received this message because you are subscribed to a topic in > the Google Groups "google-guice" group. > > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-guice/c2Gt_ABD7cQ/unsubscribe. > > To unsubscribe from this group and all its topics, send an email > to [email protected] > <mailto:google-guice%[email protected]>. > > To post to this group, send email to [email protected] > <mailto:[email protected]>. > > Visit this group at http://groups.google.com/group/google-guice. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/google-guice/b0d87ebc-b473-4b1b-97da-ec85f5755b5a%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "google-guice" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > > To post to this group, send email to [email protected] > <mailto:[email protected]>. > > Visit this group at http://groups.google.com/group/google-guice. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-guice/CACyC%2BgJXxxM%3Dk-i10dDyxROigYPv_Dm_72_qT7GqBP5Y3pnfxw%40mail.gmail.com > <https://groups.google.com/d/msgid/google-guice/CACyC%2BgJXxxM%3Dk-i10dDyxROigYPv_Dm_72_qT7GqBP5Y3pnfxw%40mail.gmail.com?utm_medium=email&utm_source=footer>. > > For more options, visit https://groups.google.com/d/optout. > > > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/5639BC5E.7000701%40googlemail.com. For more options, visit https://groups.google.com/d/optout.
