Modifier and Type | Class and Description |
---|---|
static class |
DefaultParser.ArgumentList
The result of a delimited buffer.
|
Parser.ParseContext
Constructor and Description |
---|
DefaultParser() |
Modifier and Type | Method and Description |
---|---|
char[] |
getEscapeChars() |
char[] |
getQuoteChars() |
boolean |
isDelimiter(CharSequence buffer,
int pos)
Returns true if the specified character is a whitespace parameter.
|
boolean |
isDelimiterChar(CharSequence buffer,
int pos)
Returns true if the character at the specified position if a delimiter.
|
boolean |
isEofOnEscapedNewLine() |
boolean |
isEofOnUnclosedQuote() |
boolean |
isEscapeChar(CharSequence buffer,
int pos)
Check if this character is a valid escape char (i.e.
|
boolean |
isEscaped(CharSequence buffer,
int pos)
Check if a character is escaped (i.e.
|
boolean |
isQuoteChar(CharSequence buffer,
int pos) |
boolean |
isQuoted(CharSequence buffer,
int pos) |
ParsedLine |
parse(String line,
int cursor,
Parser.ParseContext context) |
void |
setEofOnEscapedNewLine(boolean eofOnEscapedNewLine) |
void |
setEofOnUnclosedQuote(boolean eofOnUnclosedQuote) |
void |
setEscapeChars(char[] chars) |
void |
setQuoteChars(char[] chars) |
public void setQuoteChars(char[] chars)
public char[] getQuoteChars()
public void setEscapeChars(char[] chars)
public char[] getEscapeChars()
public void setEofOnUnclosedQuote(boolean eofOnUnclosedQuote)
public boolean isEofOnUnclosedQuote()
public void setEofOnEscapedNewLine(boolean eofOnEscapedNewLine)
public boolean isEofOnEscapedNewLine()
public ParsedLine parse(String line, int cursor, Parser.ParseContext context)
public boolean isDelimiter(CharSequence buffer, int pos)
getQuoteChars()
, and is not escaped by ant of the getEscapeChars()
, and
returns true from isDelimiterChar(java.lang.CharSequence, int)
.buffer
- The complete command bufferpos
- The index of the character in the bufferpublic boolean isQuoted(CharSequence buffer, int pos)
public boolean isQuoteChar(CharSequence buffer, int pos)
public boolean isEscapeChar(CharSequence buffer, int pos)
public boolean isEscaped(CharSequence buffer, int pos)
buffer
- the buffer to check inpos
- the position of the character to checkpublic boolean isDelimiterChar(CharSequence buffer, int pos)
getQuoteChars()
, and is not escaped by ant of the
getEscapeChars()
. To perform escaping manually, override isDelimiter(java.lang.CharSequence, int)
instead.Copyright © 2018. All rights reserved.