commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Dixon-Peugh <>
Subject [cli] Suggestions
Date Sun, 06 Jan 2002 01:05:40 GMT

I've been fooling with the CLI package in the
Sandbox, and I've got a few suggestions on how
it might be improved.

#1 - Usage Statement

Since we are setting up the Options class with
all the option possibilites and their descriptions,
it seems a logical place to generate a Usage

#2 - Default Values on Options

It seems that the default values are known when
the options are created.  It makes sense to set
the defaults when the Options object is created.

#3 - Integrate with Properties Object

It would be nice, if I could write something like

public static void main(String args[]) {
    Options opt = new QuiltOptions("");

    try {
      Properties prop = opt.parse( args );
    } catch (MissingArgumentException e) {
      System.err.println( opt.getUsageStatement() );
      System.exit( -1 );

What do you think?  I think it makes the code look
an awful lot cleaner than the way it works now.



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message