Annotation Interface Cli


@Target(TYPE) @Retention(RUNTIME) @Documented public @interface Cli
Class annotation used to declaratively specify a CLI
  • Nested Class Summary

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

    Required Elements
    Modifier and Type
    Required Element
    Description
    Sets the name of the CLI i.e.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Defines the classes that provide top-level commands for the CLI
    Defines the class that provides the default command for the CLI
    Sets the description of the CLI
    Defines command groups for the CLI
    boolean
    Sets whether the default global restrictions are applied
    Sets the parser configuration for the CLI
    Defines the classes that provide global restrictions for the CLI
  • Element Details

    • name

      String name
      Sets the name of the CLI i.e. the command name users enter to invoke your CLI
      Returns:
      Name
    • description

      String description
      Sets the description of the CLI
      Returns:
      Description
      Default:
      ""
    • parserConfiguration

      Parser parserConfiguration
      Sets the parser configuration for the CLI
      Returns:
      Parser Configuration
      Default:
      @com.github.rvesse.airline.annotations.Parser
    • groups

      Group[] groups
      Defines command groups for the CLI
      Returns:
      Command groups
      Default:
      {}
    • defaultCommand

      Class<?> defaultCommand
      Defines the class that provides the default command for the CLI
      Returns:
      Default command class
      Default:
      com.github.rvesse.airline.annotations.Cli.NO_DEFAULT.class
    • commands

      Class<?>[] commands
      Defines the classes that provide top-level commands for the CLI
      Returns:
      Top-level command classes
      Default:
      {}
    • restrictions

      Class<? extends GlobalRestriction>[] restrictions
      Defines the classes that provide global restrictions for the CLI
      Returns:
      Global restriction classes
      Default:
      {}
    • includeDefaultRestrictions

      boolean includeDefaultRestrictions
      Sets whether the default global restrictions are applied
      Returns:
      True if default restrictions are applied, false otherwise
      Default:
      true