Details
-
Wish
-
Status: Closed
-
Major
-
Resolution: Invalid
-
5.0.11
-
None
-
None
Description
it is not possible to create a strategy for an interface that contains a method with a generic Class as parameter
the example below will create an exception if getModel(...) of the created Strategy object is called
public interface MLSelectModelFactory() {
SelectModel getModel(Class<T> clazz);
}
public MLSelectModelFactory build(StrategyBuilder builder,
Map<Class, MLSelectModelFactory> configuration) {
StrategyRegistry<MLSelectModelFactory> registry =
StrategyRegistry.newInstance(MLSelectModelFactory.class, configuration);
return builder.build(registry);
}