1 package org.kohsuke.args4j;
2
3 /***
4 * Used with {@link CmdLineParser#printExample(ExampleMode)}.
5 *
6 * @author Kohsuke Kawaguchi
7 */
8 public enum ExampleMode {
9 /***
10 * Print all defined options in the example.
11 *
12 * <p>
13 * This would be useful only when you have small number of options.
14 */
15 ALL() {
16 /*package*/ boolean print(Option o) {
17 return true;
18 }
19 },
20
21 /***
22 * Print all {@link Option#required() required} option.
23 */
24 REQUIRED() {
25 /*package*/ boolean print(Option o) {
26 return o.required();
27 }
28 };
29
30 /*package*/ abstract boolean print(Option o);
31 }