Class CLICommand

java.lang.Object
net.royalur.cli.CLICommand
Direct Known Subclasses:
CLIRoutingCommand, LutMoveStatsCommand, LutReadCommand, LutTrainCommand, StatsCountCommand

public abstract class CLICommand extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • addRequiredArg

      public void addRequiredArg(String name, CLIArgumentType type, String... descriptionLines)
    • addOptionalArg

      public void addOptionalArg(String name, CLIArgumentType type, String... descriptionLines)
    • countPositionalArgs

      public int countPositionalArgs()
    • countKeywordArgs

      public int countKeywordArgs()
    • getCommandStack

      public CLICommand[] getCommandStack()
    • appendCommandNoArgs

      protected void appendCommandNoArgs(StringBuilder builder)
    • appendPositionalArgs

      protected void appendPositionalArgs(StringBuilder builder, boolean leadingSpace)
    • getCommandForHelp

      protected String getCommandForHelp(boolean includeArgs)
    • getCommandForHelp

      public String getCommandForHelp()
    • getCommandNoArgs

      public String getCommandNoArgs()
    • getCommand

      public String getCommand()
    • printHelp

      public void printHelp(PrintStream out)
    • handle

      @Nullable public abstract CLIHandler handle(CLI cli) throws Exception
      Throws:
      Exception