| Modifier and Type | Field and Description |
|---|---|
protected String |
line
Original line to parse.
|
protected int |
tokenPosition
Current position of the parser in the token stream.
|
| Constructor and Description |
|---|
LineParser(String line)
Returns a new command parser for a given command line.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<String> |
getArgList()
Returns a list of all tokens that can be considered being command arguments, using the current token position.
|
Map<String,String> |
getArgMap()
Returns a map of all tokens that can be considered being command arguments, using the current token position.
|
Map<SkbShellArgument,Object> |
getArgMap(SkbShellArgument[] arguments)
Returns an argument map fitting the given value key set (using defined types).
|
String |
getArgs()
Returns an string of all tokens that can be considered being command arguments, using the current token position.
|
String |
getLine()
Returns the original command line.
|
String |
getToken()
Returns an array of all tokens being parsed.
|
LineParser |
setTokenPosition(int pos)
Sets the parsers position in the token stream.
|
protected String line
protected int tokenPosition
public LineParser(String line)
line - command linepublic LineParser setTokenPosition(int pos)
pos - new positionpublic String getLine()
public String getToken()
public String getArgs()
public ArrayList<String> getArgList()
public Map<String,String> getArgMap()
public Map<SkbShellArgument,Object> getArgMap(SkbShellArgument[] arguments)
arguments - input arguments to test arguments againstCopyright © 2010–2017. All rights reserved.