public abstract static class ArgumentCompletor.AbstractArgumentDelimiter extends Object implements ArgumentCompletor.ArgumentDelimiter
isDelimiter(java.lang.String, int)
method to determine if a particular character should be used as a
delimiter.Constructor and Description |
---|
AbstractArgumentDelimiter() |
Modifier and Type | Method and Description |
---|---|
ArgumentCompletor.ArgumentList |
delimit(String buffer,
int cursor)
Break the specified buffer into individual tokens that can be
completed on their own.
|
char[] |
getEscapeChars() |
char[] |
getQuoteChars() |
boolean |
isDelimiter(String buffer,
int pos)
Returns true if the specified character is a whitespace parameter.
|
abstract boolean |
isDelimiterChar(String buffer,
int pos)
Returns true if the character at the specified position if a
delimiter.
|
boolean |
isEscaped(String buffer,
int pos) |
boolean |
isQuoted(String buffer,
int pos) |
void |
setEscapeChars(char[] escapeChars) |
void |
setQuoteChars(char[] quoteChars) |
public void setQuoteChars(char[] quoteChars)
public char[] getQuoteChars()
public void setEscapeChars(char[] escapeChars)
public char[] getEscapeChars()
public ArgumentCompletor.ArgumentList delimit(String buffer, int cursor)
ArgumentCompletor.ArgumentDelimiter
delimit
in interface ArgumentCompletor.ArgumentDelimiter
buffer
- the buffer to splitcursor
- the current position of the cursor in the
bufferpublic boolean isDelimiter(String buffer, int pos)
getQuoteChars()
, and is not escaped by ant of the
getEscapeChars()
, and returns true from
isDelimiterChar(java.lang.String, int)
.isDelimiter
in interface ArgumentCompletor.ArgumentDelimiter
buffer
- the complete command bufferpos
- the index of the character in the bufferpublic boolean isQuoted(String buffer, int pos)
public boolean isEscaped(String buffer, int pos)
public abstract boolean isDelimiterChar(String buffer, int pos)
getQuoteChars()
, and is not escaped by
ant of the getEscapeChars()
. To perform escaping manually,
override isDelimiter(java.lang.String, int)
instead.Copyright © 2024. All rights reserved.