* @return the javascript code generator from the given class
*/
private static Object executeOrGenerate(Class<?> clazz, boolean execute, boolean withSourceMap) {
File generationPath = new File("target", TEMP_GENERATION_PATH);
GenerationDirectory generationFolder = new GenerationDirectory(generationPath, new File(TEMP_GENERATION_PATH), new File(""));
String sourcePath = "src/test/java";
File resourcePath = new File("src/test/resources");
ClassWithJavascript stjsClass = gen.generateJavascript(Thread.currentThread().getContextClassLoader(), clazz.getName(), new File(
sourcePath), generationFolder, new File("target", "test-classes"),
new GeneratorConfigurationBuilder().allowedPackage("org.stjs.javascript").allowedPackage("org.stjs.generator")