@Test public void doubleSwitchToThreadSafeFactory() throws Exception { Funky.setThreadSafeInput(false); Funky.setThreadSafeInput(true); FunctionFactory factory = getFactory(); InputHolder inputHolder = factory.getInputHolder(); assertTrue(inputHolder instanceof ThreadSafeInputHolder); }
public static void setThreadSafeInput(boolean threadSafe) { if (threadSafe) { factory = createThreadSafeFactory(); } else { factory = createSingleThreadFactory(); } }
Funky { public static void setThreadSafeInput(boolean threadSafe) { if (threadSafe) { factory = createThreadSafeFactory(); } else { factory = createSingleThreadFactory(); } } }
Funky { public static void setThreadSafeInput(boolean threadSafe) { if (threadSafe) { factory = createThreadSafeFactory(); } else { factory = createSingleThreadFactory(); } } protected  Funky(); }
Funky { public static void setThreadSafeInput(boolean threadSafe) { if (threadSafe) { factory = createThreadSafeFactory(); } else { factory = createSingleThreadFactory(); } } protected  Funky(); static ClassFunction<T> newFunction(Class<T> applyingClass, Object... constructorArguments); static ClassFunctionWithInput<T> newFunctionWithInput(Class<T> applyingClass, Object... constructorArguments); static void setThreadSafeInput(boolean threadSafe); static T getInput(); }
Funky { public static void setThreadSafeInput(boolean threadSafe) { if (threadSafe) { factory = createThreadSafeFactory(); } else { factory = createSingleThreadFactory(); } } protected  Funky(); static ClassFunction<T> newFunction(Class<T> applyingClass, Object... constructorArguments); static ClassFunctionWithInput<T> newFunctionWithInput(Class<T> applyingClass, Object... constructorArguments); static void setThreadSafeInput(boolean threadSafe); static T getInput();  }