1 package org.kohsuke.args4j;
2
3 /***
4 * Associates a Java field/property with an element/attribute of an Ant task.
5 *
6 * @author Kohsuke Kawaguchi
7 */
8 public @interface Ant {
9 /***
10 * Whether this option is mapped to an attribute or a nested element.
11 */
12 Kind type() default Kind.ATTRIBUTE;
13
14 /***
15 * Name of the attribute or the nested element.
16 *
17 * <p>
18 * If left unspecified, the value is computed from {@link Option#name()}
19 * on the same field/method by removing the leading '-'.
20 */
21 String name() default "";
22
23 /***
24 * The usage of this option.
25 *
26 * <p>
27 * If left unspecified, the value is taken from {@link Option#usage()}
28 * on the same field/method.
29 */
30 String usage() default "";
31
32 enum Kind {
33 /***
34 * The option is mapped to a nested element of the Ant task.
35 */
36 ELEMENT,
37 /***
38 * The option is mapped to an attribute of the Ant task.
39 */
40 ATTRIBUTE,
41 }
42 }