Search in sources :

Example 1 with GroupConfiguration

use of cx2x.translator.config.GroupConfiguration in project claw-compiler by C2SM-RCM.

the class Cx2x method showConfig.

/**
   * Read the configuration file and output the information for user.
   *
   * @param configPath Path to the configuration file.
   * @param schemaPath Path to the XSD schema for configuration file validation.
   */
private static void showConfig(String configPath, String schemaPath) {
    try {
        Configuration config = new Configuration(configPath, schemaPath);
        System.out.println("- CLAW translator configuration -\n");
        System.out.println("Default accelerator directive: " + config.getCurrentDirective() + "\n");
        System.out.println("Default target: " + config.getCurrentTarget() + "\n");
        System.out.println("Current transformation order:");
        int i = 0;
        for (GroupConfiguration g : config.getGroups()) {
            System.out.printf("  %1d) %-20s - type:%-15s, class:%-60s\n", i++, g.getName(), g.getType(), g.getTransformationClassName());
        }
    } catch (Exception e) {
        error("Could not read the configuration file.\n" + e.getMessage());
    }
}
Also used : GroupConfiguration(cx2x.translator.config.GroupConfiguration) Configuration(cx2x.translator.config.Configuration) GroupConfiguration(cx2x.translator.config.GroupConfiguration)

Aggregations

Configuration (cx2x.translator.config.Configuration)1 GroupConfiguration (cx2x.translator.config.GroupConfiguration)1