class ArgParser {

    public Config parseConfiguration(final String[] args) {
        final CommandLine c;
        Config config;
        try {
            c = parseConfigArgs(configOptions, args);
            config = parseConfigFileOptions(c);
            config = addSharedOptions(c, config);
            return config;
        } catch (final ParseException e) {
            printHelp("Error parsing args: " + e.getMessage());
            throw new RuntimeException(e.getMessage());
        }
    }

}