Class CommandLineOptions
java.lang.Object
org.exolab.adaptx.util.CommandLineOptions
A utility class for generating command line options
- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the flag to list of available command line optionsvoidAdds the flag to list of available command line optionsvoidAdds the flag to list of available command line optionsgetOptions(String[] args) parses the arguments into a hashtable with the proper flag as the keyvoidprintHelp(PrintWriter pw) voidvoidsetComment(String flag, String comment) Sets a comment for the flagvoidsetInvokeCommand(String invokeCommand) Sets the command used to invoke the applicationvoidsetOptional(String flag, boolean optional) Sets whether or not a given flag is optionalvoidsetUsageInfo(String flag, String usage) Sets the text to print after the flag when printing the usage line
-
Constructor Details
-
CommandLineOptions
public CommandLineOptions()
-
-
Method Details
-
addFlag
Adds the flag to list of available command line options- Parameters:
flag- the flag to add as an available command line option
-
addFlag
-
addFlag
-
getOptions
parses the arguments into a hashtable with the proper flag as the key -
setComment
-
setOptional
Sets whether or not a given flag is optional- Parameters:
flag- the flag to set optionality foroptional- the boolean indicating the optionality for the given flag
-
setInvokeCommand
Sets the command used to invoke the application- Parameters:
invokeCommand- the command used to invoke the application
-
setUsageInfo
-
printUsage
-
printHelp
-