Allows Options to be created from a single String.
The pattern contains various single character flags and via
an optional punctuation character, their expected type.
a | -a flag |
b@ | -b [classname] |
c> | -c [filename] |
d+ | -d [classname] (creates object via empty contructor) |
e% | -e [number] (creates Double/Long instance depeding on existing of a '.') |
f/ | -f [url] |
g: | -g [string] |
For example, the following allows command line flags of '-v -p string-value -f /dir/file'.
Options options = PatternOptionBuilder.parsePattern("vp:f/");
TODO These need to break out to OptionType and also
to be pluggable.
author: Henri Yandell (bayard @ generationjava.com) version: $Revision: 542144 $ |