Options
class represents a collection of command line options and utility methods for parsing the command line. Very useful for getting cheap and powerful parsing of command line options.
@author Ben L. Titzer
OPTIONS
metohd implementation.
@author Pier Fumagalli
These flags are EXPERIMENTAL and subject to change.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
This class stores invocation configuration for XJC. The configuration in this class shoule be abstract enough so that it could be parsed from both command-line or Ant.
The following features are supported:
Information such as help, usage, and versions are displayed when the respective --help and --version options are specified. The --menu option will invoke the built-in menu.
In the example below, the program processes three simple options.
public class AboutMe { private static StringOption name = new StringOption( "Ryan" ); private static IntOption age = new IntOption( 19 ); private static DoubleOption bankBalance = new DoubleOption( 15.15 ); public static void main( String args[] ) { Options repo = new Options( "java AboutMe" ); repo.register( "name", 'n', name, "The person's name." ); repo.register( "age", 'a', age, "The person's age." ); repo.register( "balance", 'b', "The person's bank balance.", bankBalance ); repo.process( args ); g * System.err.println( "" + name + ", age " + age + " has a " + " bank balance of " + bankBalance + "." ); } }
Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved. ritopt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ritopt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ritopt; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA@author Damian Eads
Main entry-point into the library.
Options represents a collection of {@link Option} objects, whichdescribe the possible options for a command-line.
It may flexibly parse long and short options, with or without values. Additionally, it may parse only a portion of a commandline, allowing for flexible multi-stage parsing.
@see org.apache.commons.cli.CommandLine @author bob mcwhirter (bob @ werken.com) @author James Strachan @version $Revision: 542144 $
main
method, then call {@link #setFromCmdLine} with thegiven args. Next, an instanceof the class being invoked is created, and {@link #setInto} is called with that instance as a parameter. With thispattern, the user can configure any bean properties of the class, or even properties of classes reachable from the class, through the command line.
@author Abe White
@nojavadoc
Wraps a set of options possibly defined for a WiQuery {@link Component}.
By default, Options are rendered as a JavaScript object like this:
{ option1: 'value1', option2: 'value2 }This rendering can be customized by creating a {@link IOptionsRenderer}. @author Lionel Armanet @author Hielke Hoeve @author Ernesto Reinaldo Barreiro @since 0.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|