I realize you said that it was just mail-buffer code, but it brings up
a question for me.

The alternating lines of bind and expose in Private Modules have
always struck me as being clunky.

Your example below with expose(BaseDao.class).annotatedWith
(Gui.class).to(...) looks cleaner, but I don't see it working, at
least not in the last snapshot (20081123).

I checked <http://google-guice.googlecode.com/svn/trunk/latest-javadoc/
com/google/inject/PrivateModule.html> and don't see a hint of this
rather reasonable looking usage there either.

Is this the syntax for the EDL that will work in the Guice 2.0
release?

Leigh.

On Jan 14, 2:50 pm, "Robbie Vanbrabant" <[email protected]>
wrote:
>
> Rough Guice 2.0 example (quickly coded in gmail):
>
> Usage:
> new DaoModule() {
>   @Override
>   protected void customBindings() {
>     expose(BaseDao.class).annotatedWith(Gui.class).to(...);
>     bindConstant().annotatedWith(Names.named("xml")).to(xml);
>   }

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to