Multibindings are the way Guice is implementing plug-in mechanism.
The best I can think of is having a single SetBinder and add all
pluggable classes there.
Then implement your own methods which iterate over all binded classes
and filter for the criteria you need.
class Fruity {
@Inject Set
Hello,
I want to perform a hierarchical lookup. Suppose I have the following code:
bind(Apple.class).in(Singleton.class);
bind(Banana.class).in(Singleton.class);
bind(Grape.class).in(Singleton.class);
Now suppose that Apple and Grape implement the JuiceFactory interface,
which Banana does not.