You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Julia (JIRA)" <ji...@apache.org> on 2014/11/07 23:31:35 UTC
[jira] [Closed] (REEF-34) Add utility function in Tang to parse
command lines
[ https://issues.apache.org/jira/browse/REEF-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julia closed REEF-34.
---------------------
Resolution: Fixed
The PR is merged to apache master
> Add utility function in Tang to parse command lines
> ---------------------------------------------------
>
> Key: REEF-34
> URL: https://issues.apache.org/jira/browse/REEF-34
> Project: REEF
> Issue Type: Bug
> Components: Tang
> Reporter: Markus Weimer
> Assignee: Julia
> Priority: Minor
>
> 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:
> {code}
> public static Configuration parseToConfiguration(final String[] args, final Class<? extends Name<?>>... argClasses) throws ParseException;
> {code}
> And while we are at it, we might just as well add:
> {code}
> public static ConfigurationBuilder parseToConfigurationBuilder(final String[] args, final Class<? extends Name<?>>... argClasses) throws ParseException;
> {code}
> Having these two methods should clean up our examples quite a bit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)