Search in sources :

Example 1 with ExmlConfigClassGenerator

use of net.jangaroo.exml.generator.ExmlConfigClassGenerator in project jangaroo-tools by CoreMedia.

the class ExmlSourceFile method generateConfigClass.

public File generateConfigClass() {
    if (generatedConfigClassFile == null) {
        ConfigClass configClass = getConfigClass();
        generatedConfigClassFile = configClassRegistry.getConfig().computeConfigClassTarget(configClass.getName());
        // only recreate file if result file is older than the source file
        if (mustGenerate(generatedConfigClassFile)) {
            // generate the new config class ActionScript file
            try {
                new ExmlConfigClassGenerator().generateClass(configClass, generatedConfigClassFile);
            } catch (Exception e) {
                throw new ExmlcException("unable to generate config class: " + e.getMessage(), generatedConfigClassFile, e);
            }
        }
    }
    return generatedConfigClassFile;
}
Also used : ExmlcException(net.jangaroo.exml.api.ExmlcException) ExmlConfigClassGenerator(net.jangaroo.exml.generator.ExmlConfigClassGenerator) ExmlcException(net.jangaroo.exml.api.ExmlcException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 ExmlcException (net.jangaroo.exml.api.ExmlcException)1 ExmlConfigClassGenerator (net.jangaroo.exml.generator.ExmlConfigClassGenerator)1