public static CommandLine parse()

in src/main/java/org/apache/commons/exec/CommandLine.java [77:94]


    public static CommandLine parse(final String line, final Map<String, ?> substitutionMap) {

        if (line == null) {
            throw new IllegalArgumentException("Command line cannot be null");
        }
        if (line.trim().isEmpty()) {
            throw new IllegalArgumentException("Command line cannot be empty");
        }
        final String[] tmp = translateCommandline(line);

        final CommandLine cl = new CommandLine(tmp[0]);
        cl.setSubstitutionMap(substitutionMap);
        for (int i = 1; i < tmp.length; i++) {
            cl.addArgument(tmp[i]);
        }

        return cl;
    }