Annotation Interface Shortcut


@Target(METHOD) @Retention(RUNTIME) public @interface Shortcut
Is used to register a shortcut for the sub command executor. It has to be declared on the method annotated with Execute with name specified (cannot be used with root executor).

Example:

 @Command(name = "base")
 public static class TestCommand {

  @Execute(name = "sub") // /base sub
  @Shortcut({ "short", "shortcut" }) // /short or /shortcut
  void executeSub()
      ...
  }

 }
 
Class above would register command /base sub and its shortcut /short or /shortcut.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details