| |
|
| java.lang.Object workbench.util.ArgumentParser
All known Subclasses: workbench.AppArguments,
ArgumentParser | public class ArgumentParser (Code) | | author: support@sql-workbench.net |
ArgumentParser | public ArgumentParser()(Code) | | |
ArgumentParser | public ArgumentParser(boolean parameterSwitchNeeded)(Code) | | |
getArgumentCount | public int getArgumentCount()(Code) | | |
getIntValue | public int getIntValue(String key, int def)(Code) | | |
getRegisteredArguments | public List<String> getRegisteredArguments()(Code) | | Returns the list of known arguments for this ArgumentParser
the registered argument types |
getUnknownArguments | public String getUnknownArguments()(Code) | | Return a list of unknown arguments.
Each argument passed in the original command line
that has not been registered using addArgument()
will be listed in the result. For each argument
in this list, isRegistered() would return false.
a comma separated string with unknown arguments |
getValue | public String getValue(String key)(Code) | | Return the parameter for the give argument.
If no value was specified or the parameter was not
passed on the commandline null will be returned.
Any leading or trailing quotes will be removed from the argument
before it is returned.
Parameters: key - the parameter to retrieve the value as provided by the user or null if no value specified See Also: StringUtil.trimQuotes(String) |
hasArguments | public boolean hasArguments()(Code) | | |
hasUnknownArguments | public boolean hasUnknownArguments()(Code) | | |
isArgPresent | public boolean isArgPresent(String arg)(Code) | | Check if the given argument was passed on the commandline.
This does not check if a value has been supplied with the
argument. This can be used for argument-less parameters
e.g. -showEncodings
true if the given argument was part of the commandline |
isRegistered | public boolean isRegistered(String arg)(Code) | | Check if the given argument is a valid argument for the current commandline
true if arg was registered with addArgument() |
needsSwitch | public boolean needsSwitch()(Code) | | |
|
|
|