Public Member Functions | Package Attributes

org.exolab.castor.util.CommandLineOptions Class Reference

List of all members.

Public Member Functions

 CommandLineOptions ()
void addFlag (String flag)
void addFlag (String flag, String comment)
void addFlag (String flag, String usageText, String comment)
void addFlag (String flag, String usageText, String comment, boolean optional)
Properties getOptions (String[] args)
void setComment (String flag, String comment)
void setOptional (String flag, boolean optional)
void setUsageInfo (String flag, String usage)
void printUsage (PrintWriter pw)
void printHelp (PrintWriter pw)

Package Attributes

Vector flags = null
Hashtable optionInfo = null
PrintWriter errorWriter = null

Detailed Description

A utility class for generating command line options

Author:
Keith Visco
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:03

Constructor & Destructor Documentation

org.exolab.castor.util.CommandLineOptions.CommandLineOptions (  ) 

Member Function Documentation

void org.exolab.castor.util.CommandLineOptions.addFlag ( String  flag  ) 

Adds the flag to list of available command line options

Parameters:
flag the flag to add as an available command line option

Referenced by org.exolab.castor.util.CommandLineOptions.addFlag(), org.exolab.castor.builder.SourceGenerator.main(), and org.exolab.castor.tools.MappingTool.main().

void org.exolab.castor.util.CommandLineOptions.addFlag ( String  flag,
String  comment 
)

Adds the flag to list of available command line options

Parameters:
flag the flag to add as an available command line option
comment a comment for the flag

References org.exolab.castor.util.CommandLineOptions.addFlag().

void org.exolab.castor.util.CommandLineOptions.addFlag ( String  flag,
String  usageText,
String  comment,
boolean  optional 
)

Adds the flag to list of available command line options

Parameters:
flag the flag to add as an available command line option
comment a comment for the flag
usageText the text that appears after the flag in the usage string
optional,when true, indicates that this flag is optional

References org.exolab.castor.util.CommandLineOptions.flags, org.exolab.castor.util.CommandLineOptions.optionInfo, org.exolab.castor.util.CmdLineOption.setComment(), org.exolab.castor.util.CmdLineOption.setOptional(), and org.exolab.castor.util.CmdLineOption.setUsageText().

void org.exolab.castor.util.CommandLineOptions.addFlag ( String  flag,
String  usageText,
String  comment 
)

Adds the flag to list of available command line options

Parameters:
flag the flag to add as an available command line option
comment a comment for the flag
usageText the text that appears after the flag in the usage string

References org.exolab.castor.util.CommandLineOptions.addFlag().

Properties org.exolab.castor.util.CommandLineOptions.getOptions ( String[]  args  ) 
void org.exolab.castor.util.CommandLineOptions.printHelp ( PrintWriter  pw  ) 
void org.exolab.castor.util.CommandLineOptions.printUsage ( PrintWriter  pw  ) 
void org.exolab.castor.util.CommandLineOptions.setComment ( String  flag,
String  comment 
)

Sets a comment for the flag

Parameters:
flag the flag to set the comment for
comment the comment to use when printing help for the given flag

References org.exolab.castor.util.CommandLineOptions.optionInfo, and org.exolab.castor.util.CmdLineOption.setComment().

void org.exolab.castor.util.CommandLineOptions.setOptional ( String  flag,
boolean  optional 
)

Sets whether or not a given flag is optional

Parameters:
flag the flag to set optionality for
optional the boolean indicating the optionality for the given flag

References org.exolab.castor.util.CommandLineOptions.optionInfo, and org.exolab.castor.util.CmdLineOption.setOptional().

void org.exolab.castor.util.CommandLineOptions.setUsageInfo ( String  flag,
String  usage 
)

Sets the text to print after the flag when printing the usage line

Parameters:
flag the flag to set the usage info for
usage the usage text

References org.exolab.castor.util.CommandLineOptions.optionInfo, and org.exolab.castor.util.CmdLineOption.setUsageText().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties