return new BridgeClass(dependencyResolver, clazz);
}
File inputFile = getInputFile(sourceFolder, className);
File outputFile = getOutputFile(generationFolder.getAbsolutePath(), className);
JavaScriptNameProvider names = new DefaultJavaScriptNameProvider();
GenerationPlugins<Object> currentClassPlugins = plugins.forClass(clazz);
GenerationContext<Object> context = new GenerationContext<Object>(inputFile, configuration, names, null, builtProjectClassLoader,
cacheAnnotations, getJavaScriptBuilder());
CompilationUnitTree cu = parseAndResolve(inputFile, context, builtProjectClassLoader, configuration.getSourceEncoding());
// check the code
Timers.start("check-java");
currentClassPlugins.getCheckVisitor().scan(cu, (GenerationContext) context);
context.getChecks().check();
Timers.end("check-java");
// generate the javascript code
Timers.start("write-js-ast");
Object javascriptRoot = currentClassPlugins.getWriterVisitor().scan(cu, context);
// check for any error arriving during writing
context.getChecks().check();
Timers.end("write-js-ast");
STJSClass stjsClass = new STJSClass(dependencyResolver, targetFolder, className);
Set<String> resolvedClasses = new LinkedHashSet<String>(names.getResolvedTypes());
resolvedClasses.remove(className);
stjsClass.setDependencies(resolvedClasses);
stjsClass.setGeneratedJavascriptFile(relative(generationFolder, className));
// dump the ast to a file