GWT GIN - тривиальный вариант использования не работает (EventBus)

Модуль GIN:

public class InjectorModule extends AbstractGinModule {
    @Override
    protected void configure() {
        bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
    }
}

Инжектор:

@GinModules(InjectorModule.class)
public interface Injector extends Ginjector {
    EventBus getEventBus();
}

Точка входа модуля GWT:

public class Module1 implements EntryPoint {
    private final Injector injector = GWT.create(Injector.class);

    public void onModuleLoad() {        
        injector.getEventBus();
    }   
}

Удаление вызова injector.getEventBus () , чтобы все работало нормально . Вызов injector.getEventBus () вызывает:

Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.google.web.bindery.event.shared.EventBus' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at com.XXX.app.client.InjectorImpl.create_Key$type$com$google$web$bindery$event$shared$EventBus$_annotation$$none$$(InjectorImpl.java:72)
at com.XXX.app.client.InjectorImpl.get_Key$type$com$google$web$bindery$event$shared$EventBus$_annotation$$none$$(InjectorImpl.java:86)
at com.XXX.app.client.InjectorImpl.getEventBus(InjectorImpl.java:7)
at com.XXX.app.client.Module1.onModuleLoad(Module1.java:24)

Режим разработки GWT говорит:

23:58:50.287 [ERROR] Deferred binding result type 'com.google.web.bindery.event.shared.EventBus' should not be abstract
5
задан Andrey Agibalov 30 October 2011 в 06:50
поделиться