src/site/apt/implementOptionhandler.apt
raw| 1 | args4j comes with a built-in support for parsing options into several Java datatypes (such as <<<int>>>, <<<String>>>, and <<<Enum>>>). You can extend this further by writing your own {{{apidocs/org/kohsuke/args4j/spi/OptionHandler.html}OptionHandler}} implementation, then registering it to the <<<CmdLineParser>>> class. |
| 2 | |
| 3 | In fact, most of the built-in support is implemented using this mechanism. The <<<OptionHandler>>> class's source code details how to do this. |