public class CmdLineOption
extends java.lang.Object
CmdLineParser
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_COMMAND
Command-line option type: COMMAND
|
static int |
TYPE_OPTION
Command-line option type: OPTION
|
Constructor and Description |
---|
CmdLineOption(java.lang.String name,
java.lang.String altName,
int type,
boolean takesArgVal)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAltName()
Get method for altName
|
java.lang.String |
getName()
Get method for name
|
int |
getType()
Get method for type
|
java.lang.String |
getValue()
Get method for value
|
void |
setValue(java.lang.String value)
Set method for value
|
boolean |
takesArg()
Get method for takesArgVal
|
public static final int TYPE_COMMAND
public static final int TYPE_OPTION
public CmdLineOption(java.lang.String name, java.lang.String altName, int type, boolean takesArgVal) throws java.lang.IllegalArgumentException
name
- Name of the optionaltName
- Altername name of the optiontype
- Type of the optiontakesArgVal
- Flag to indicate whether the option takes argument or notjava.lang.IllegalArgumentException
- If option type is TYPE_COMMAND and takesArgVal is specified as truepublic void setValue(java.lang.String value)
value
- Valuepublic java.lang.String getName()
public java.lang.String getAltName()
public int getType()
public boolean takesArg()
public java.lang.String getValue()
Copyright © 2007-2020 Samir Vaidya. All Rights Reserved.