@Retention(value=RUNTIME) @Target(value=FIELD) public @interface AdditionalOptions
..Options
classes (e.g. subclasses of
AbstractCommand
), then a AdditionalOptionsCmdLineParser
will recursively look for
options/arguments in the (class of the) field and add them to the parser, almost allowing traits
for options.
Usage example:
class MyOptions{ @AdditionalOptions public ReusableSubOptions subOptions; @Option(...) public String someOption; } class ReusableSubOptions{ @Option(...) public String someSubOption; }