View Javadoc

1   package org.lsst.ccs.command.annotations;
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   * Annotation for parameters of Command-marked methods. 
11   */
12  @Target(ElementType.PARAMETER)
13  @Retention(RetentionPolicy.RUNTIME)
14  @Documented
15  public @interface Argument {
16  
17      public static final String NULL = "***NULL_VALUE_FOR_COMMAND_ARGUMENT***";
18      
19      /**
20       * Optional parameter name. If not set the argument name will be "arg0",
21       * "arg1"....
22       *
23       * @return The name of the argument.
24       */
25      String name();
26  
27      /**
28       * One-sentence description of the parameter.
29       *
30       * @return Short description of the annotated argument.
31       */
32      String description() default "";
33  
34      /**
35       * Default value for this Argument.
36       *
37       * @return the default value for this Argument.
38       */
39      String defaultValue() default NULL;
40  }