Annotation Interface ShellMethodAvailability


@Retention(RUNTIME) @Target(METHOD) @Documented public @interface ShellMethodAvailability
Used to customize the name of the method used to indicate availability of a command. In the absence of this annotation, the dynamic availability of a command method named foo is discovered via method fooAvailability.
  • If this annotation is added to the foo method, then its value() should be the name of an availability method (in place of fooAvailability()) that returns Availability.
  • If placed on a method that returns Availability and takes no argument, then the value() of this annotation should be the command names (or aliases) of the commands this availability indicator is for. The special value of "*" (the default) matches all commands implemented in the current class.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String[] value
      Returns:
      the name of the availability method for this command method, or if placed on an availability method, the names of the commands it is for.
      Default:
      {"*"}