Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently, creating a chain enforces you to write quite a lot of boilerplate code. When using a lot of chains, a module class is full of methods looking similar. The only difference is the service interface.
public static ServiceInterface buildServiceInterface(ChainBuilder builder, List<ServiceInterface> commands) {
return builder.build.(ServiceInterface.class, commands);
}
It would be nice to create chains inside the bind method:
public static void bind(ServiceBinder bind) {
binder.chain(ServiceInterface.class);
}