uk.me.parabola.mkgmap
Class CommandArgsReader

java.lang.Object
  extended by uk.me.parabola.mkgmap.CommandArgsReader

public class CommandArgsReader
extends java.lang.Object

Command line arguments for Main. Arguments consist of options and filenames. You read arguments from left to right and when a filename is encountered the file is processed with the options that were in force at the time. Since it is likely that the number of options will become quite large, you can place options in a file. Place the options each on a separate line without the initial '--'.

Author:
Steve Ratcliffe

Constructor Summary
CommandArgsReader(ArgumentProcessor proc)
           
 
Method Summary
 void readArgs(java.lang.String[] args)
          Read and interpret the command line arguments.
 void setValidOptions(java.util.Set<java.lang.String> validOptions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandArgsReader

public CommandArgsReader(ArgumentProcessor proc)
Method Detail

readArgs

public void readArgs(java.lang.String[] args)
Read and interpret the command line arguments. Most have a double hyphen preceding them and these work just the same if they are in a config file.

There are a few options that consist of a single hyphen followed by a single letter that are short cuts for a long option.

The -c option is special. It is followed by the name of a file in which there are further command line options. Any option on the command line that comes after the -c option will override the value that is set in this file.

Parameters:
args - The command line arguments.

setValidOptions

public void setValidOptions(java.util.Set<java.lang.String> validOptions)