code: public String getName() {
          String name = getClass().getName();
          name = name.substring(name.lastIndexOf('.') + 1); // short name
          name = name.substring(name.lastIndexOf('$')+1);
          if(name.endsWith("Command"))
              name = name.substring(0,name.length()-7); // trim off the command
  
          // convert "FooBarZot" into "foo-bar-zot"
          // Locale is fixed so that "CreateInstance" always become "create-instance" no matter where this is run.
          return name.replaceAll("([a-z0-9])([A-Z])","$1-$2").toLowerCase(Locale.ENGLISH);
      }
docs: Gets the command name.
  
  <p>
  For example, if the CLI is invoked as {@code java -jar cli.jar foo arg1 arg2 arg4},
  on the server side {@link CLICommand} that returns "foo" from {@link #getName()}
  will be invoked.
  
  <p>
  By default, this method creates "foo-bar-zot" from "FooBarZotCommand".