Annotation Interface Group


Marks a class as providing command group metadata
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the group.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Command classes to add to the group (optional)
    Default command class for the group (optional)
    Description of the group.
    boolean
    Whether the group should be hidden
  • Element Details

    • name

      String name
      Name of the group.

      If the name contains spaces then this is interpreted as a sub-group, for example foo bar would be interpreted as a group foo with a sub-group bar. All the other fields on this annotation are interpreted as applying to the sub-group being specified.

      If you also wished to place commands into the foo group you would need to specify this separately. Since only one instance of an annotation can appear on any given class you would need to use the Groups annotation to place multiple Group annotations on a class.

      Returns:
      Name
    • description

      String description
      Description of the group.
      Returns:
      Description
      Default:
      ""
    • defaultCommand

      Class<?> defaultCommand
      Default command class for the group (optional)
      Returns:
      Default Command for the group
      Default:
      com.github.rvesse.airline.annotations.Group.NO_DEFAULT.class
    • commands

      Class<?>[] commands
      Command classes to add to the group (optional)
      Returns:
      Command classes for the group
      Default:
      {}
    • hidden

      boolean hidden
      Whether the group should be hidden
      Returns:
      True if hidden, false otherwise
      Default:
      false