Method Summary |
|
protected void | add(Option option) Add the specified option. |
public Runtime | att(String external, String internal, boolean multiple, String description) Declare an attribute-valued command line option. |
public Runtime | bool(String external, String internal, boolean value, String description) Declare a boolean command line option.
Parameters: external - The external name. Parameters: internal - The internal name. Parameters: value - The default value. Parameters: description - The description. |
protected void | check(String external, String internal) Check that no option with the specified names exits. |
protected void | check(Option option, Object value) Check that the specified value is valid for the specified option. |
public Printer | console() Get a printer to the console. |
public Runtime | dir(String external, String internal, boolean multiple, String description) Declare a directory-valued command line option. |
public Printer | errConsole() Get a printer to the error console. |
public void | error() Record an error reported through another means. |
public void | error(String msg) Print the specified error message. |
public void | error(String msg, Node n) Print the specified error message. |
public int | errorCount() Get the current error count. |
public void | exit() Exit the tool. |
public Runtime | file(String external, String internal, boolean multiple, String description) Declare a file-valued command line option.
Parameters: external - The external name. Parameters: internal - The internal name. Parameters: multiple - The flag for multiple occurrences. Parameters: description - The description. |
public long | freeMemory() Get an estimate of free memory. |
public List<Attribute> | getAttributeList(String name) Get the attribute list value of the specified option.
Parameters: name - The internal name. |
public File | getFile(String name) Get the file value of the specified option.
Parameters: name - The internal name. |
public List<File> | getFileList(String name) Get the file list value of the specified option.
Parameters: name - The internal name. |
public int | getInt(String name) Get the integer value of the specified option.
Parameters: name - The internal name. |
public List> | getList(String name) Get the list value of the specified option.
Parameters: name - The internal name. |
public File | getOutputDirectory() Get this runtime's output directory. |
public Reader | getReader(File file) Get a reader for the specified file. |
public Reader | getReader(InputStream in) Get a reader for the specified input stream. |
public String | getString(String name) Get the string value of the specified option.
Parameters: name - The internal name. |
public Object | getValue(String name) Get the value of the specified option.
Parameters: name - The internal name. |
public Writer | getWriter(File file) Get a writer for the specified file. |
public Writer | getWriter(OutputStream in) Get a writer for the specified output stream. |
public boolean | hasPrefixValue(String prefix) Determine whether any option with the specified prefix has a
value.
Parameters: prefix - The prefix. |
public boolean | hasValue(String name) Determine whether the specified option has a value.
Parameters: name - The internal name. |
public void | initDefaultValues() Initialize all options without values to their defaults. |
public void | initFlags(boolean value) Initialize all boolean options without values to the specified
value. |
public void | initFlags(String prefix, boolean value) Initialize all boolean options with the specified prefix and
without values to the specified value. |
public File | locate(String path) Locate the specified file. |
public Runtime | number(String external, String internal, int value, String description) Declare an integer-valued command line option.
Parameters: external - The external name. Parameters: internal - The internal name. Parameters: value - The default value. Parameters: description - The description. |
public void | printOptions() Print a description of all command line options to the console. |
public int | process(String args) Process the specified command line arguments. |
public boolean | seenError() Determine whether errors have been reported. |
public void | setConsole(Printer console) Update the printer to the console. |
public void | setErrConsole(Printer console) Update the printer to the error console. |
public void | setValue(String name, Object value) Set the value of the specified option. |
public void | setValue(String name, boolean value) Set the value of the specified boolean-valued option. |
public boolean | test(String name) Test the value of the specified boolean option.
Parameters: name - The internal name. |
public void | warning() Record a warning reported through another means. |
public void | warning(String msg) Print the specified warning message. |
public void | warning(String msg, Node n) Print the specified warning message. |
public Runtime | word(String external, String internal, boolean multiple, String description) Declare a word-valued command line option.
Parameters: external - The external name. Parameters: internal - The internal name. Parameters: multiple - The flag for multiple occurrences. Parameters: description - The description. throws: IllegalArgumentException - Signals that an option withthe external or interal name already exists. |