View Javadoc

1   package org.cyclopsgroup.jcli.annotation;
2   
3   import java.lang.annotation.Documented;
4   import java.lang.annotation.ElementType;
5   import java.lang.annotation.Retention;
6   import java.lang.annotation.RetentionPolicy;
7   import java.lang.annotation.Target;
8   
9   /**
10   * Type annotated with Cli is considered as a command where options and arguments are set
11   * 
12   * @author <a href="mailto:jiaqi.guo@gmail.com">Jiaqi Guo</a>
13   */
14  @Documented
15  @Target( ElementType.TYPE )
16  @Retention( RetentionPolicy.RUNTIME )
17  public @interface Cli
18  {
19      /**
20       * @return String description of command
21       */
22      String description() default "";
23  
24      /**
25       * @return Name of command
26       */
27      String name();
28  
29      /**
30       * @return Note displayed as footer
31       */
32      String note() default "";
33  
34      /**
35       * @return True if unexpected option or argument is expected to cause error
36       */
37      boolean restrict() default true;
38  }