我想将所有UseCaseFactory子类绑定到UseCaseFactories(这是所有子类的子类)。
而不是列出所有子类(这可行):
bind(DeleteEmployeeUseCaseFactory.class).toInstance(useCaseFactories);
bind(GetEmployeeUseCaseFactory.class).toInstance(useCaseFactories);
我想做这样的事情。我怎么能?
bind(subClassesOf(UseCaseFactory.class)).toInstance(useCaseFactories);