public class CmdLineParser
extends java.lang.Object
Constructor and Description |
---|
CmdLineParser(CmdLineOptions stdOptions,
java.lang.String[] args)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getNonStdOptions()
Method to get the list of non-standard options
|
int |
getNumOfOptions()
Method to get the total number of options (standard plus non-standard) provided in the command-line
|
java.lang.String |
getOptionName(int index)
Method to get the name of the option by index
|
java.lang.String |
getOptionValue(java.lang.String name)
Method to get the value of the given option (by name)
|
CmdLineOptions |
getParsedOptions()
Get method for parsedOptions
|
java.util.List<CmdLineOption> |
getParsedOptionsAsList()
Method to get the list of standard options
|
boolean |
isValid()
Method to check whether the command-line options are valid or not.
|
public CmdLineParser(CmdLineOptions stdOptions, java.lang.String[] args)
stdOptions
- List of standard optionsargs
- Command line argumentspublic boolean isValid()
public java.lang.String getOptionValue(java.lang.String name)
name
- Name of the optionpublic java.lang.String getOptionName(int index)
index
- Index of the optionpublic java.util.List<CmdLineOption> getParsedOptionsAsList()
public java.util.List<java.lang.String> getNonStdOptions()
public CmdLineOptions getParsedOptions()
public int getNumOfOptions()
Copyright © 2007-2020 Samir Vaidya. All Rights Reserved.