ds.ov2.util
Class String_option
java.lang.Object
ds.ov2.util.Option
ds.ov2.util.String_option
public class String_option
- extends Option
Command line switch with a String argument. When the option is
found the string is recorded in a reference.
- CPP Preprocessing
- no cpp preprocessing needed
- Execution Environment:
- host
- Author:
- Hendrik Tews
- Version:
- $Revision: 1.1 $
- Last Commit:
- $Date: 2009-06-02 09:56:03 $ by $Author: tews $
Field Summary |
private Reference<String> |
ref
The reference where the option argument will be stored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ref
private Reference<String> ref
- The reference where the option argument will be stored.
String_option
public String_option(String option,
Reference<String> ref,
String argument,
String explanation)
- Construct a string option. When found on the
command line, the reference
ref
will be set to the
next command line element.
- Parameters:
option
- the literal option string as it will appear on
the command lineref
- the string referenceargument
- name of the argument for the explanationexplanation
- explanation for the usage information
get_string_argument
public String get_string_argument(Commandline cl)
- Retrieve a String argument from the command line. Displays an
error message and terminates the application if there is no
next command line element.
- Parameters:
cl
- the command line instance
- Returns:
- next unprocessed command line element as String
matched
public void matched(Commandline cl)
- Called when the option is recognized. Retrieves the next
command line element and stores it in the String reference
ref
.
- Specified by:
matched
in class Option
- Parameters:
cl
- command line instance