Interface CommandLineParser

    • Method Detail

      • parse

        CommandLine parse​(Options options,
                          String[] arguments)
                   throws ParseException
        Parse the arguments according to the specified options.
        Parameters:
        options - the specified Options
        arguments - the command line arguments
        Returns:
        the list of atomic option and value tokens
        Throws:
        ParseException - if there are any problems encountered while parsing the command line tokens.
      • parse

        CommandLine parse​(Options options,
                          String[] arguments,
                          boolean stopAtNonOption)
                   throws ParseException
        Parse the arguments according to the specified options.
        Parameters:
        options - the specified Options
        arguments - the command line arguments
        stopAtNonOption - if true an unrecognized argument stops the parsing and the remaining arguments are added to the CommandLines args list. If false an unrecognized argument triggers a ParseException.
        Returns:
        the list of atomic option and value tokens
        Throws:
        ParseException - if there are any problems encountered while parsing the command line tokens.