I'm trying to use AssistedInject with Gin in GWT 2.4.0:
public interface ElevatorButtonFactory {
ElevatorButton create(int shownFloorNumber, Action<Integer> onClick);
}
@Inject
ElevatorButton(GameHost gameHost, @Assisted int shownFloorNumber,
@Assisted Action<Integer> onClick) {
// ...
}
In my Gin module:
install(new GinFactoryModuleBuilder().implement(ElevatorButton.class, ElevatorButton.class)
.build(ElevatorButtonFactory.class));
That seems like it should be sufficient, right? But when I try to take ElevatorButtonFactory
as an injected parameter, I get the following error:
[ERROR] [foo] - Deferred binding result type 'com.foo.html.client.components.floorpicker.ElevatorButton.ElevatorButtonFactory' should not be abstract
What am I doing wrong?