Package org.jboss.as.cli.parsing
Class DefaultStateWithEndCharacter
- java.lang.Object
-
- org.jboss.as.cli.parsing.DefaultParsingState
-
- org.jboss.as.cli.parsing.ExpressionBaseState
-
- org.jboss.as.cli.parsing.DefaultStateWithEndCharacter
-
- All Implemented Interfaces:
ParsingState
public class DefaultStateWithEndCharacter extends ExpressionBaseState
- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultStateWithEndCharacter.Builder
-
Field Summary
-
Fields inherited from class org.jboss.as.cli.parsing.DefaultParsingState
enterStateHandlers
-
-
Constructor Summary
Constructors Constructor Description DefaultStateWithEndCharacter(String id, char leaveStateChar, boolean endRequired, boolean enterLeaveContent)DefaultStateWithEndCharacter(String id, char leaveStateChar, boolean endRequired, boolean enterLeaveContent, CharacterHandlerMap enterStateHandlers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultStateWithEndCharacter.Builderbuilder(String id)CharacterHandlergetEndContentHandler()CharacterHandlergetHandler(char ch)StringgetId()CharacterHandlergetLeaveHandler()CharacterHandlergetReturnHandler()booleanlockValueIndex()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).voidsetEndContentHandler(CharacterHandler handler)voidsetEnterHandler(CharacterHandler handler)voidsetLeaveHandler(CharacterHandler handler)voidsetReturnHandler(CharacterHandler handler)booleanupdateValueIndex()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.ExpressionBaseState
getEnterHandler, putExpressionHandler
-
Methods inherited from class org.jboss.as.cli.parsing.DefaultParsingState
enterState, getDefaultHandler, getWhitespaceHandler, isIgnoreWhitespaces, isLeaveOnWhitespace, leaveState, putHandler, setDefaultHandler, setHandleEntrance, setIgnoreWhitespaces, setLeaveOnWhitespace, setWhitespaceHandler
-
-
-
-
Constructor Detail
-
DefaultStateWithEndCharacter
public DefaultStateWithEndCharacter(String id, char leaveStateChar, boolean endRequired, boolean enterLeaveContent)
-
DefaultStateWithEndCharacter
public DefaultStateWithEndCharacter(String id, char leaveStateChar, boolean endRequired, boolean enterLeaveContent, CharacterHandlerMap enterStateHandlers)
-
-
Method Detail
-
builder
public static DefaultStateWithEndCharacter.Builder builder(String id)
-
getHandler
public CharacterHandler getHandler(char ch)
- Specified by:
getHandlerin interfaceParsingState- Overrides:
getHandlerin classDefaultParsingState
-
getId
public String getId()
- Specified by:
getIdin interfaceParsingState
-
getEndContentHandler
public CharacterHandler getEndContentHandler()
- Specified by:
getEndContentHandlerin interfaceParsingState
-
setEndContentHandler
public void setEndContentHandler(CharacterHandler handler)
-
getReturnHandler
public CharacterHandler getReturnHandler()
- Specified by:
getReturnHandlerin interfaceParsingState
-
setReturnHandler
public void setReturnHandler(CharacterHandler handler)
-
setEnterHandler
public void setEnterHandler(CharacterHandler handler)
-
getLeaveHandler
public CharacterHandler getLeaveHandler()
- Specified by:
getLeaveHandlerin interfaceParsingState
-
setLeaveHandler
public void setLeaveHandler(CharacterHandler handler)
-
updateValueIndex
public boolean updateValueIndex()
Description copied from interface:ParsingStateWhether 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:
updateValueIndexin 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:ParsingStateWhether 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:
lockValueIndexin interfaceParsingState- Returns:
- true if the value index should remain unchanged until this state is left.
-
-