0

I have this GinModule:

public class LocalizadorGinModule extends AbstractGinModule {
    @Override
    protected void configure() {
        bind(Localizador.class).to(LocalizadorAImple.class).in(Singleton.class);
        bind(Localizador.class).to(LocalizadorBImpl.class).in(Singleton.class);
    }
}

and I wanna use it like this:

public interface LocalizadorGinjector extends Ginjector {
    Localizador getA();
    Localizador getB();
}

But I dont know how gwt will know the right implementation.

Is there any way to do this?

insertusernamehere
  • 23,204
  • 9
  • 87
  • 126

1 Answers1

0

At best, i would suggest writing your own provider. Then your provider can decide whether it returns A or B however it likes.

mP.
  • 18,002
  • 10
  • 71
  • 105