that's a java defect or not provided feature. instead use
TypeLiteral<http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/TypeLiteral.html>

your code should be something like :

TypeLiteral<ICache<Npc>> inpc = new TypeLiteral<ICache<Npc>>() {};
TypeLiteral<Cache<Npc>> npc = new TypeLiteral<Cache<Npc>>() {};

bind(inpc).to(npc);

and similar for the other binding

hope this helps!

jordi

On Tue, Apr 14, 2009 at 10:57 PM, aemami <aemam...@gmail.com> wrote:

>
> Hi, I am trying to accomplish the following:
>
> bind(ICache<Npc>.class).to(Cache<Npc>.class);
>
> and
>
> bind(IMyMapper<Npc>.class).to(NpcMapper.class);
>
> This doesn't seem possible in Java, or is it?
>
> Keep in mind I'm not a java guy, I'm used to using Ninject (which was
> patterned after Google Guice) and C#.
>
> Thanks
> >
>

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

Reply via email to