Package org.jboss.as.cli.parsing.command
Class CommandState
- java.lang.Object
-
- org.jboss.as.cli.parsing.DefaultParsingState
-
- org.jboss.as.cli.parsing.command.CommandState
-
- All Implemented Interfaces:
ParsingState
public class CommandState extends DefaultParsingState
- Author:
- Alexey Loubyansky
-
-
Field Summary
Fields Modifier and Type Field Description static String
ID
static CommandState
INSTANCE
-
Fields inherited from class org.jboss.as.cli.parsing.DefaultParsingState
enterStateHandlers
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharacterHandler
getEndContentHandler()
CharacterHandler
getEnterHandler()
String
getId()
CharacterHandler
getLeaveHandler()
CharacterHandler
getReturnHandler()
boolean
lockValueIndex()
Whether the index of the current value being parsed should remain the same until parsing leaves this state even if there are other nested states that might want to update the value index (i.e.void
setEndContentHandler(CharacterHandler handler)
void
setEnterHandler(CharacterHandler handler)
void
setLeaveHandler(CharacterHandler handler)
void
setReturnHandler(CharacterHandler handler)
boolean
updateValueIndex()
Whether the index of the value corresponding to this state in the command line being parsed should be set to the index when parsing enters this state.-
Methods inherited from class org.jboss.as.cli.parsing.DefaultParsingState
enterState, getDefaultHandler, getHandler, getWhitespaceHandler, isIgnoreWhitespaces, isLeaveOnWhitespace, leaveState, putHandler, setDefaultHandler, setHandleEntrance, setIgnoreWhitespaces, setLeaveOnWhitespace, setWhitespaceHandler
-
-
-
-
Field Detail
-
INSTANCE
public static final CommandState INSTANCE
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceParsingState
-
getEndContentHandler
public CharacterHandler getEndContentHandler()
- Specified by:
getEndContentHandler
in interfaceParsingState
-
setEndContentHandler
public void setEndContentHandler(CharacterHandler handler)
-
getReturnHandler
public CharacterHandler getReturnHandler()
- Specified by:
getReturnHandler
in interfaceParsingState
-
setReturnHandler
public void setReturnHandler(CharacterHandler handler)
-
getEnterHandler
public CharacterHandler getEnterHandler()
- Specified by:
getEnterHandler
in interfaceParsingState
-
setEnterHandler
public void setEnterHandler(CharacterHandler handler)
-
getLeaveHandler
public CharacterHandler getLeaveHandler()
- Specified by:
getLeaveHandler
in interfaceParsingState
-
setLeaveHandler
public void setLeaveHandler(CharacterHandler handler)
-
updateValueIndex
public boolean updateValueIndex()
Description copied from interface:ParsingState
Whether the index of the value corresponding to this state in the command line being parsed should be set to the index when parsing enters this state.- Specified by:
updateValueIndex
in interfaceParsingState
- Returns:
- true if the index of the current value should be updated when parsing enters this state, false - otherwise.
-
lockValueIndex
public boolean lockValueIndex()
Description copied from interface:ParsingState
Whether the index of the current value being parsed should remain the same until parsing leaves this state even if there are other nested states that might want to update the value index (i.e. states that return true from updateValueIndex).- Specified by:
lockValueIndex
in interfaceParsingState
- Returns:
- true if the value index should remain unchanged until this state is left.
-
-