Class ArgumentProcessor
java.lang.Object
org.apache.geode.modules.session.installer.args.ArgumentProcessor
This class is used to process command line arguments for Java programs in a flexible and powerful
manner.
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentProcessor(String progName) Creates a new Argument processor instance for te program name given. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgument(Argument arg) Adds a new argument.getUsage()Generates command line usage text for display to user.Process the command line arguments provided.voidSets the handler to call when an unknown argument is encountered.
-
Constructor Details
-
ArgumentProcessor
Creates a new Argument processor instance for te program name given.- Parameters:
progName- program name used in usage
-
-
Method Details
-
addArgument
Adds a new argument.- Parameters:
arg- argument to add
-
setUnknownArgumentHandler
Sets the handler to call when an unknown argument is encountered.- Parameters:
aHandler- unknown arg handler, or null to unset
-
process
Process the command line arguments provided.- Parameters:
programArgs- command line arguments supplied to program- Returns:
- argument values parsed out of command line
- Throws:
UsageException- when usge sucked
-
getUsage
Generates command line usage text for display to user.- Returns:
- usage to dusplay to user
-