private static AbstractCompiler getCompiler(ModuleDef module) {
ConfigurationProperty compilerClassProp = module.getProperties().createConfiguration(
"x.compiler.class", false);
String compilerClassName = compilerClassProp.getValue();
if (compilerClassName == null || compilerClassName.length() == 0) {
return new JavaScriptCompiler();
}
Throwable caught;
try {
Class<?> compilerClass = Class.forName(compilerClassName);
return (AbstractCompiler) compilerClass.newInstance();