Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The dominant usecase for the CommandLine class in Tang is to parse a command line argument array straight into a Configuration, given a set of named parameters. I suggest to add this as a static utility function with the following signature:
public static Configuration parseToConfiguration(final String[] args, final Class<? extends Name<?>>... argClasses) throws ParseException;
And while we are at it, we might just as well add:
public static ConfigurationBuilder parseToConfigurationBuilder(final String[] args, final Class<? extends Name<?>>... argClasses) throws ParseException;
Having these two methods should clean up our examples quite a bit.
Attachments
Issue Links
- links to