C
- Command typepublic class SingleCommand<C> extends Object
Modifier and Type | Method and Description |
---|---|
CommandMetadata |
getCommandMetadata()
Gets the command metadata
|
ParserMetadata<C> |
getParserConfiguration()
Gets the parser configuration
|
C |
parse(Iterable<String> args)
Parses the arguments to produce a command instance
|
C |
parse(String... args)
Parses the arguments to produce a command instance
|
ParseResult<C> |
parseWithResult(Iterable<String> args)
Parses the arguments to produce a result.
|
ParseResult<C> |
parseWithResult(String... args)
Parses the arguments to produce a result.
|
static <C> SingleCommand<C> |
singleCommand(Class<C> command)
Creates a new single command
|
static <C> SingleCommand<C> |
singleCommand(Class<C> command,
ParserMetadata<C> parserConfig)
Creates a new single command
|
public static <C> SingleCommand<C> singleCommand(Class<C> command)
command
- Command classpublic static <C> SingleCommand<C> singleCommand(Class<C> command, ParserMetadata<C> parserConfig)
command
- Command classparserConfig
- Parser configuration to use, if null
the default
configuration is usedpublic CommandMetadata getCommandMetadata()
public ParserMetadata<C> getParserConfiguration()
public C parse(String... args)
args
- Argumentspublic C parse(Iterable<String> args)
args
- Argumentspublic ParseResult<C> parseWithResult(String... args)
CollectAll
) and to get a command instanceargs
- Argumentspublic ParseResult<C> parseWithResult(Iterable<String> args)
CollectAll
) and to get a command instanceargs
- ArgumentsCopyright © 2012–2017. All rights reserved.