try {
ExmlConfiguration config = configClassRegistry.getConfig();
generatedTargetClassFile = config.computeGeneratedComponentClassFile(sourceFile);
if (mustGenerate(generatedTargetClassFile)) {
ExmlModel exmlModel = new ExmlToModelParser(configClassRegistry).parse(sourceFile);
return new ExmlComponentClassGenerator(config).generateClass(exmlModel, generatedTargetClassFile);
}
} catch (Exception e) {
throw new ExmlcException("unable to generate component class: " + e.getMessage(), sourceFile, e);
}
}