Classes for simplifying command line parsing. The general idea is to annotate methods with {@link edu.tum.cs.commons.options.AOption}, which are then exposed as command line switches. Whether the option takes an argument (and the type of the argument) is determined by the arguments the method accepts. Additional constraints on the option arguments (e.g. value positive) can be enforced by the method by throwing an IllegalArgumentException.
The options are extracted and collected by an {@link edu.tum.cs.commons.options.OptionRegistry}. The OptionRegistry extracts methods annotated with AOption and keeps them as {@link edu.tum.cs.commons.options.OptionApplicator}s for later use. To support the distribution of option handling over multiple classes (e.g. to separate options affecting different parts of the architecture) multiple objects can be registered with the registry.
The actual parsing of the command line is performed by the {@link edu.tum.cs.commons.options.CommandLine}. This is to separate the low level part (annotations and reflection) from the parser. Additionally this way the parser can easily be extended or exchanged.
As an example for using these classes see the edu.tum.cs.conqat.driver.Driver class in the ConQAT project.