Enable injector with multiple AbstractGinModule

In google Guice, I can create an injector based on multiple modules using a function createInjector

.

Since I am using GWT.create

GoogleGin for injector injection, is it possible to create a Ginjector based on multiple AbstractGinModule

.

If we can't, how do you arrange your code to avoid binding in a single module?

+2


source to share


1 answer


I am using the following code to create an injector that uses multiple modules:



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

    AppPresenter getAppPresenter();

    PlaceManager getPlaceManager();

    EventBus getEventBus();
}

      

+7


source







All Articles