commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Coté <...@experian.fr>
Subject Re: [CLI]: ParseException:Unrecognized option: -p
Date Mon, 09 Dec 2002 10:23:14 GMT
Hi,

> <snip/>
>> As I already mention in a previous email today, I think there is at 
>> least a documentation bug since the different behavior of each parser 
>> should be clearly explain in the javadoc.  (If those difference are 
>> expected.)
> Well maybe the documentation just needs to be moved. Check out
> the links below for descriptions of what the flatten methods
> in each Parser do:
> 
> [1]http://jakarta.apache.org/commons/cli/apidocs/org/apache/commons/cli/GnuParser.html#flatten(org.apache.commons.cli.Options,%20java.lang.String[],%20boolean)
> [2]http://jakarta.apache.org/commons/cli/apidocs/org/apache/commons/cli/PosixParser.html#flatten(org.apache.commons.cli.Options,%20java.lang.String[],%20boolean)
> [3]http://jakarta.apache.org/commons/cli/apidocs/org/apache/commons/cli/BasicParser.html#flatten(org.apache.commons.cli.Options,%20java.lang.String[],%20boolean)
> 

I check the refered documentation.  I still think there is a need for 
more documentation, or a different documentation.  The method flatten is 
protected, so its documentation is intent for developper who need to 
overload it (and of course developper who write the class).

Simple user of a parser should not have to understand the implementation 
of it to be able to use it.  The documentation of the class and its 
public method should be enough for anybody to use it, and know which 
behavior expected from the class they are using.

For example, I think the documentation of the PosixParser should clearly 
state : "That class expect all short option to have a single character". 
  Also, those all parser assume that a "--" is a long option, or just 
the posix.




-- 
Guillaume Coté
gco@experian.fr
Tel. :  +33.1.41.45.13.87
Fax. :  +33.1.41.45.10.50


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message