public interface CommandContext
Modifier and Type | Interface and Description |
---|---|
static class |
CommandContext.DefaultCommandContext
Default implementation of a
CommandContext . |
Modifier and Type | Method and Description |
---|---|
CommandRegistration |
getCommandRegistration()
Gets a command registration.
|
<T> T |
getOptionValue(String name)
Gets an mapped option value.
|
CommandParser.CommandParserResults |
getParserResults()
Gets a command option parser results.
|
String[] |
getRawArgs()
Gets a raw args passed into a currently executing command.
|
org.jline.terminal.Terminal |
getTerminal()
Gets a terminal.
|
boolean |
hasMappedOption(String name)
Gets if option has been mapped.
|
static CommandContext |
of(String[] args,
CommandParser.CommandParserResults results,
org.jline.terminal.Terminal terminal,
CommandRegistration commandRegistration)
Gets an instance of a default
CommandContext . |
String[] getRawArgs()
boolean hasMappedOption(String name)
name
- the option nameCommandParser.CommandParserResults getParserResults()
CommandRegistration getCommandRegistration()
<T> T getOptionValue(String name)
T
- the type to map toname
- the option nameorg.jline.terminal.Terminal getTerminal()
static CommandContext of(String[] args, CommandParser.CommandParserResults results, org.jline.terminal.Terminal terminal, CommandRegistration commandRegistration)
CommandContext
.args
- the argumentsresults
- the resultsterminal
- the terminalcommandRegistration
- the command registrationCopyright © 2024. All rights reserved.