File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
com.siemens.jminizinc.core/src/main/java/at/siemens/ct/jmz/executor Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,20 @@ public ExecutorFactory(Class<E> executorClass) {
2525 this .executorClass = executorClass ;
2626 }
2727
28- public E createExecutor (String identifier ) {
28+ public E createExecutor (String identifier , MiniZincSolver miniZincSolver ) {
2929 try {
30- Constructor <E > constructor = executorClass .getConstructor (String .class );
31- return constructor .newInstance (identifier );
30+ Constructor <E > constructor = executorClass .getConstructor (String .class , MiniZincSolver .class );
31+ return constructor .newInstance (identifier , miniZincSolver );
32+ } catch (NoSuchMethodException | InstantiationException | IllegalAccessException
33+ | IllegalArgumentException | InvocationTargetException e ) {
34+ throw new IllegalStateException (e );
35+ }
36+ }
37+
38+ public E createExecutor (String identifier , FlatZincSolver flatZincSolver ) {
39+ try {
40+ Constructor <E > constructor = executorClass .getConstructor (String .class , FlatZincSolver .class );
41+ return constructor .newInstance (identifier , flatZincSolver );
3242 } catch (NoSuchMethodException | InstantiationException | IllegalAccessException
3343 | IllegalArgumentException | InvocationTargetException e ) {
3444 throw new IllegalStateException (e );
You can’t perform that action at this time.
0 commit comments