File tree Expand file tree Collapse file tree
src/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616package org .apache .commons .cli ;
1717
1818/**
19+ * <p>
1920 * Allows Options to be created from a single String.
21+ * The pattern contains various single character flags and via
22+ * an optional punctuation character, their expected type.
23+ * </p>
2024 *
25+ * <table border="1">
26+ * <tr><td>a</td><td>-a flag</td></tr>
27+ * <tr><td>b@</td><td>-b [classname]</td></tr>
28+ * <tr><td>c></td><td>-c [filename]</td></tr>
29+ * <tr><td>d+</td><td>-d [classname] (creates object via empty contructor)</td></tr>
30+ * <tr><td>e%</td><td>-e [number] (creates Number instance)</td></tr>
31+ * <tr><td>f/</td><td>-f [url]</td></tr>
32+ * </table>
33+ *
34+ * <p>
35+ * For example, the following allows command line flags of '-v -p string-value -f /dir/file'.
36+ * </p>
37+ * <code>Options options = PatternOptionBuilder.parsePattern("vp:f/");</code>
38+ *
39+ * <p>
2140 * TODO These need to break out to OptionType and also
2241 * to be pluggable.
42+ * </p>
2343 *
2444 * @author Henri Yandell (bayard @ generationjava.com)
2545 * @version $Revision: 1.2 $
@@ -185,4 +205,4 @@ else if (ch == '!')
185205
186206 return options ;
187207 }
188- }
208+ }
You can’t perform that action at this time.
0 commit comments