01: package org.kohsuke.args4j;
02:
03: import java.lang.annotation.Retention;
04: import java.lang.annotation.Target;
05:
06: import org.kohsuke.args4j.spi.OptionHandler;
07:
08: import static java.lang.annotation.RetentionPolicy.RUNTIME;
09: import static java.lang.annotation.ElementType.FIELD;
10: import static java.lang.annotation.ElementType.METHOD;
11:
12: /**
13: * Argument of the command line.
14: *
15: * This works mostly like {@link Option} except the following differences.
16: *
17: * <ol>
18: * <li>Arguments have an index about their relative position on the command line.
19: * </ol>
20: *
21: * @author Kohsuke Kawaguchi
22: * @author Mark Sinke
23: */
24: @Retention(RUNTIME)
25: @Target({FIELD,METHOD})
26: public @interface Argument {
27: String usage() default "";
28:
29: String metaVar() default "";
30:
31: boolean required() default false;
32:
33: Class<? extends OptionHandler> handler() default OptionHandler.class;
34:
35: int index() default 0;
36:
37: boolean multiValued() default false;
38: }
|