Annotation Interface NestedCommand


@Retention(RUNTIME) public @interface NestedCommand
Indicates a nested command. Mark methods with this annotation to tell CommandsManager that a method is merely a shell for child commands. Note that the body of a method marked with this annotation will never called. Additionally, not all fields of Command apply when it is used in conjunction with this annotation, although both are still required.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<?>[]
    A list of classes with the child commands.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If set to true it will execute the body of the tagged method.
  • Element Details

    • value

      Class<?>[] value
      A list of classes with the child commands.
      Returns:
      a list of classes
    • executeBody

      boolean executeBody
      If set to true it will execute the body of the tagged method.
      Returns:
      true to execute the body of the annotated method
      Default:
      false