protected static class AbstractCliParser.CliParserState extends Object
argument
parsing
.Modifier and Type | Field and Description |
---|---|
private int |
argumentIndex |
private CliModeObject |
currentMode |
private String |
modeOption |
Constructor and Description |
---|
CliParserState()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getArgumentIndex()
This method gets the index of the
current argument . |
CliModeObject |
getCurrentMode()
This method gets the current mode that was detected so far.
|
String |
getModeOption()
The command-line argument for the option, that activated the
current mode . |
boolean |
isOptionsComplete()
|
protected CliModeObject |
requireCurrentMode(CliState cliState)
|
void |
setCurrentMode(String option,
CliModeObject mode)
This method sets
current mode and mode-option . |
void |
setOptionsComplete()
This method sets the
options-complete flag to true . |
private CliModeObject currentMode
getCurrentMode()
private String modeOption
getModeOption()
private int argumentIndex
getArgumentIndex()
public CliModeObject getCurrentMode()
null
if no mode has been detected, yet.protected CliModeObject requireCurrentMode(CliState cliState)
cliState
- is the CliState
.CliModeObject
.public String getModeOption()
current mode
.public void setCurrentMode(String option, CliModeObject mode)
current mode
and mode-option
.option
- is the mode-option
.mode
- is the current mode
.public boolean isOptionsComplete()
options
are completed and further command-line
parameters have to be arguments
.CliParser.END_OPTIONS
public int getArgumentIndex()
current argument
.public void setOptionsComplete()
options-complete flag
to true
.Copyright © 2001–2014 mmm-Team. All rights reserved.