Class CLIParser


  • public class CLIParser
    extends Object
    • Constructor Detail

      • CLIParser

        public CLIParser​(String cmdLineSyntax)
    • Method Detail

      • getVersion

        public String getVersion()
      • setVersion

        public void setVersion​(String version)
      • initializeStandardOptions

        protected void initializeStandardOptions()
      • getOptions

        protected org.apache.commons.cli.Options getOptions()
      • addOption

        public CLIParser addOption​(OptionValidator validator)
        Adds an CLI option with a coupled OptionValidator.
        Parameters:
        validator - the option validator related to the option to add
        Returns:
        the current class instance
      • addOption

        public CLIParser addOption​(org.apache.commons.cli.Option option)
      • addOptionGroup

        public CLIParser addOptionGroup​(org.apache.commons.cli.OptionGroup group)
      • parse

        public org.apache.commons.cli.CommandLine parse​(String[] arguments)
                                                 throws org.apache.commons.cli.ParseException
        Parses the command line options provided by a main(String) method.
        Parameters:
        arguments - the arguments to parse
        Returns:
        a CommandLine object representing the parsed command line arguments
        Throws:
        org.apache.commons.cli.ParseException - if an error occurred while parsing CLI arguments
      • doShowVersion

        protected org.apache.commons.cli.CommandLine doShowVersion​(org.apache.commons.cli.CommandLine cmd)
      • doShowHelp

        public void doShowHelp()