/*
* Meviz - Various tools collection to work with multimedia.
* Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
import eu.svjatoslav.commons.commandline.parameterparser.Parser;
import eu.svjatoslav.commons.commandline.parameterparser.parameter.DirectoryParameter;
import eu.svjatoslav.commons.commandline.parameterparser.parameter.NullParameter;
-import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParameter;
+import eu.svjatoslav.commons.commandline.parameterparser.parameter.StringParameters;
public class CommandlineHandler {
NullParameter recursiveParameter = parser.createNullParameter(
"Enable recursive mode.").addAliases("-r", "--recursive");
- StringParameter inputPatternParameter = parser.createStringParameter(
+ StringParameters inputPatternParameter = parser.createStringParameters(
"File input pattern.").addAliases("-i", "--input-pattern");
DirectoryParameter workingDirectoryParameter = parser
options.recursive = true;
if (workingDirectoryParameter.isParameterSpecified())
- options.targetDirectory = workingDirectoryParameter
- .getArgumentsAsFiles().get(0);
+ options.targetDirectory = workingDirectoryParameter.getValue();
else
options.targetDirectory = new File(System.getProperty("user.dir"));
if (inputPatternParameter.isParameterSpecified())
- options.inputPatterns.addAll(inputPatternParameter
- .getArgumentsAsStrings());
+ options.inputPatterns.addAll(inputPatternParameter.getValue());
return options;
}