On Jul 6, 2:03 pm, Andrés Testi <[email protected]> wrote:
> ... and now Filler has a default binding from DefaultFiller to
> Filler ...
> @ImplementedBy(DefaultFiller.class)
> public interface Filler<From, To> {
>  ....
> }

@ImplementedBy doesn't support parameterized types. When you say
@ImplementedBy(DefaultFilter.class), that uses the raw DefaultFilter
type, which doesn't have the required type parameters. Instead, you'll
need to create separate bindings for each From/To pair:
  bind(new TypeLiteral<Filler<String, Date>>() {})
      .to(new TypeLiteral<DefaultFilter<String, Date>() {});
  bind(new TypeLiteral<Filler<Integer, Date>>() {})
      .to(new TypeLiteral<DefaultFilter<Integer, Date>() {});



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