Class Parser


  • public class Parser
    extends Object
    The Parser object is used to parse the command line and verify that the command line is CLIP compliant.
    • Constructor Detail

      • Parser

        public Parser​(String[] args,
                      int start,
                      Collection<CommandModel.ParamModel> options,
                      boolean ignoreUnknown)
               throws CommandValidationException
        Parse the given command line arguments
        Parameters:
        args - command line arguments
        start - index in args to start parsing
        options - the valid options to consider while parsing
        ignoreUnknown - if true, unknown options are considered operands instead of generating an exception
        Throws:
        CommandValidationException - if command line parsing fails
    • Method Detail

      • getOptions

        public ParameterMap getOptions()
        Returns a Map with all the options. The Map is indexed by the long name of the option.
        Returns:
        options
      • getOperands

        public List<String> getOperands()
        Returns the list of operands.
        Returns:
        list of operands