Class SelectCommand
- java.lang.Object
-
- software.amazon.smithy.cli.commands.SelectCommand
-
- All Implemented Interfaces:
Command
public final class SelectCommand extends java.lang.Object
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.smithy.cli.Command
Command.Env
-
-
Constructor Summary
Constructors Constructor Description SelectCommand(java.lang.String parentCommandName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<ArgumentReceiver>
createArgumentReceivers()
Creates argument receivers for the command.int
execute(Arguments arguments, Command.Env env)
Executes the command using the provided arguments.java.lang.String
getDocumentation(CliPrinter printer)
Gets the long description of the command.java.lang.String
getName()
Gets the name of the command.java.lang.String
getSummary()
Gets a short summary of the command that's shown in the main help.void
printHelp(Arguments arguments, CliPrinter printer)
Prints help output.protected int
run(Arguments arguments, Command.Env env, java.util.List<java.lang.String> models)
Run the non-help command after all arguments have been parsed.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Command
Gets the name of the command.The returned name should contain no spaces or special characters.
- Returns:
- Returns the command name.
-
getSummary
public java.lang.String getSummary()
Description copied from interface:Command
Gets a short summary of the command that's shown in the main help.- Returns:
- Returns the short help description.
-
getDocumentation
public java.lang.String getDocumentation(CliPrinter printer)
Description copied from interface:Command
Gets the long description of the command.- Parameters:
printer
- CliPrinter used in case formatting is needed viaCliPrinter.style(String, Style...)
.- Returns:
- Returns the long description.
-
createArgumentReceivers
protected java.util.List<ArgumentReceiver> createArgumentReceivers()
Creates argument receivers for the command.- Returns:
- Returns the parsed positional arguments.
-
run
protected int run(Arguments arguments, Command.Env env, java.util.List<java.lang.String> models)
Run the non-help command after all arguments have been parsed.- Parameters:
arguments
- Arguments to evaluate.env
- CLI environment settings.models
- Parsed positional arguments.- Returns:
- Returns the exit code.
-
execute
public final int execute(Arguments arguments, Command.Env env)
Description copied from interface:Command
Executes the command using the provided arguments.
-
printHelp
public void printHelp(Arguments arguments, CliPrinter printer)
Description copied from interface:Command
Prints help output.
-
-