Let's same I have an abstract class with several subclasses:
public abstract AbstractFoo { }
public FooA extends AbstractFoo {}
public FooB extends AbstractFoo {}
public FooC extends AbstractFoo {}
There's also a class with following injection:
class Bar {
@Inject
public Bar(Foo foo) { }
}
Is it possible to add Bar multiple times into multibinder with different
concrete Foo classes?
Multibinder<Bar> binder = Multibinder.newSetBinder(binder(), new Bar.class);
binder.addBinding .... // Now what?
Or did I completely miss the point of Guice here? I'm new to java world,
BTW.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.