|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjline.ArgumentCompletor.AbstractArgumentDelimiter
Abstract implementation of a delimiter that uses the
isDelimiter(java.lang.String, int) method to determine if a particular
character should be used as a delimiter.
| Constructor Summary | |
ArgumentCompletor.AbstractArgumentDelimiter()
|
|
| Method Summary | |
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArgumentCompletor.AbstractArgumentDelimiter()
| Method Detail |
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.ArgumentDelimiterbuffer - the buffer to splitcursor - the current position of the
cursor in the buffer
public 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.ArgumentDelimiterbuffer - the complete command bufferpos - the index of the character in the buffer
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||