Interface CommandParser

All Known Implementing Classes:
CommandParser.DefaultCommandParser

public interface CommandParser
Interface parsing arguments for a CommandRegistration. A command is always identified by a set of words like command subcommand1 subcommand2 and remaining part of it are options which this interface intercepts and translates into format we can understand.
  • Method Details

    • parse

      Parse options with a given arguments. May throw various runtime exceptions depending how parser is configure. For example if required option is missing an exception is thrown.
      Parameters:
      options - the command options
      args - the arguments
      Returns:
      parsed results
    • of

      static CommandParser of()
      Gets an instance of a default command parser.
      Returns:
      instance of a default command parser
    • of

      static CommandParser of(org.springframework.core.convert.ConversionService conversionService)
      Gets an instance of a default command parser.
      Parameters:
      conversionService - the conversion service
      Returns:
      instance of a default command parser