public interface CommandParser
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.Modifier and Type | Interface and Description |
---|---|
static class |
CommandParser.CommandParserException |
static interface |
CommandParser.CommandParserResult
Result of a parsing
CommandOption with an argument. |
static interface |
CommandParser.CommandParserResults
Results of a
CommandParser . |
static class |
CommandParser.DefaultCommandParser
Default implementation of a
CommandParser . |
static class |
CommandParser.DefaultCommandParserResult
Default implementation of a
CommandParser.CommandParserResult . |
static class |
CommandParser.DefaultCommandParserResults
Default implementation of a
CommandParser.CommandParserResults . |
static class |
CommandParser.MissingOptionException |
static class |
CommandParser.NotEnoughArgumentsOptionException |
static class |
CommandParser.OptionException |
static class |
CommandParser.TooManyArgumentsOptionException |
static class |
CommandParser.UnrecognisedOptionException |
Modifier and Type | Method and Description |
---|---|
static CommandParser |
of()
Gets an instance of a default command parser.
|
static CommandParser |
of(org.springframework.core.convert.ConversionService conversionService)
Gets an instance of a default command parser.
|
CommandParser.CommandParserResults |
parse(List<CommandOption> options,
String[] args)
Parse options with a given arguments.
|
CommandParser.CommandParserResults parse(List<CommandOption> options, String[] args)
options
- the command optionsargs
- the argumentsstatic CommandParser of()
static CommandParser of(org.springframework.core.convert.ConversionService conversionService)
conversionService
- the conversion serviceCopyright © 2024. All rights reserved.