tags:

views:

224

answers:

1

In google Guice, I can create an injector based on multiple module with the function createInjector.

Because I use GWT.create to instanciate the injector in GoogleGin, is it possible to create a Ginjector based on multiple AbstractGinModule.

If we can't, how do you organize your code to avoid having all your binding in the same Module ?

+1  A: 

I use the following code to create injector which is using multiple modules:

@GinModules({ ClientDispatchModule.class, MyClientModule.class })
public interface MyAppGinjector extends Ginjector {

    AppPresenter getAppPresenter();

    PlaceManager getPlaceManager();

    EventBus getEventBus();
}
grigory
perfect :). Thank you
X-Blaster