commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MADDOCKS,PETE (HP-Loveland,ex1)" <peter_maddo...@hp.com>
Subject [CLI] Need Option with only LongOpt
Date Fri, 26 Jul 2002 15:35:34 GMT
I need a modification to the Option class so that it does not require a
short option.  We have commands which use only the long option for more
obscure flags.  (I believe this is fairly common in Unix with commands like
"nmake".)  Here is an example usage statement:

NAME
array - Get and set array information. 

SYNOPSIS
array [arrayname] [ options ] 

ARGUMENTS
arrayname

OPTIONS
-a, --all
Show all attributes of the array.

-r, --rename aliasname
Sets the alias name of the Array to aliasname.  

-c, --capacity
Show all the associated capacities with this Array.

--vendor
Show the Vendor of the array. 

--product
Show the Product ID of the array.


The Option constructor that I need is:
public Option(
              java.lang.String longOpt,
              boolean hasArg,
              java.lang.String description,
              boolean required)


Also, the Options collection class should have "addOption(Option opt)"
public, so that a client can create an array of Options and then pass them
directly to the collection.


Peter Maddocks
HP NSS NAS Software Design Engineer
peter_maddocks@hp.com
 


--
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