commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject [CLI][VOTE] API Change
Date Sat, 29 Jun 2002 20:44:17 GMT
I've made a whole bunch of changes to CLI.  So the
following would be an example use of CLI with these
changes implemented.

public static void main(String[] args) {

   /** definition stage */
   Options options = new Options();
   // add Option instances

   /** parsing stage */
   CommandLineParser parser = CommandLineFactory.newParser();
   CommandLine cmd = parser.parse( options, args );

   /** interrogation stage */
   boolean b = cmd.hasOption( "b" );
}

The three stages referred to in the comments are described
in 'xdocs/introduction/xml'.

The command line tokens are now only iterated over once (the
test suite previously took 1.914 seconds to run on my machine,
it now takes 1.085).

So I'm +1 for these changes.

-John K

p.s. apologies if a similar mail was received by the list
a few days ago, but I was having problems with my mail account.


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