Class SmithyCommand

java.lang.Object
software.amazon.smithy.cli.commands.SmithyCommand
All Implemented Interfaces:
Command

public final class SmithyCommand extends Object implements Command
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: Command
      Gets the name of the command.

      The returned name should contain no spaces or special characters.

      Specified by:
      getName in interface Command
      Returns:
      Returns the command name.
    • getSummary

      public String getSummary()
      Description copied from interface: Command
      Gets a short summary of the command that's shown in the main help.
      Specified by:
      getSummary in interface Command
      Returns:
      Returns the short help description.
    • printHelp

      public void printHelp(Arguments arguments, ColorFormatter colors, CliPrinter printer)
      Description copied from interface: Command
      Prints help output.
      Specified by:
      printHelp in interface Command
      Parameters:
      arguments - Arguments that have been parsed so far.
      colors - Color formatter to use.
      printer - Where to write help.
    • execute

      public int execute(Arguments arguments, Command.Env env)
      Description copied from interface: Command
      Executes the command using the provided arguments.
      Specified by:
      execute in interface Command
      Parameters:
      arguments - CLI arguments.
      env - CLI environment settings like stdout, stderr, etc.
      Returns:
      Returns the exit code.