net.sf.mmm.util.cli.base
Class AbstractCliParser.CliParserState

java.lang.Object
  extended by net.sf.mmm.util.cli.base.AbstractCliParser.CliParserState
Enclosing class:
AbstractCliParser

protected static class AbstractCliParser.CliParserState
extends Object

This inner class holds the state of the argument parsing.


Field Summary
private  int argumentIndex
           
private  CliModeObject currentMode
           
private  String modeOption
           
 
Constructor Summary
AbstractCliParser.CliParserState()
          The constructor.
 
Method Summary
 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()
          This method determines if the options are completed and further command-line parameters have to be arguments.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentMode

private CliModeObject currentMode
See Also:
getCurrentMode()

modeOption

private String modeOption
See Also:
getModeOption()

argumentIndex

private int argumentIndex
See Also:
getArgumentIndex()
Constructor Detail

AbstractCliParser.CliParserState

public AbstractCliParser.CliParserState()
The constructor.

Method Detail

getCurrentMode

public CliModeObject getCurrentMode()
This method gets the current mode that was detected so far.

Returns:
the currentMode or null if no mode has been detected, yet.

getModeOption

public String getModeOption()
The command-line argument for the option, that activated the current mode.

Returns:
the modeOption

setCurrentMode

public void setCurrentMode(String option,
                           CliModeObject mode)
This method sets current mode and mode-option.

Parameters:
option - is the mode-option.
mode - is the current mode.

isOptionsComplete

public boolean isOptionsComplete()
This method determines if the options are completed and further command-line parameters have to be arguments.

Returns:
the optionsComplete
See Also:
CliParser.END_OPTIONS

getArgumentIndex

public int getArgumentIndex()
This method gets the index of the current argument.

Returns:
the argumentIndex

setOptionsComplete

public void setOptionsComplete()
This method sets the options-complete flag to true.



Copyright © 2001-2010 mmm-Team. All Rights Reserved.