public abstract static class ArgumentCompleter.AbstractArgumentDelimiter extends Object implements ArgumentCompleter.ArgumentDelimiter
isDelimiter(java.lang.CharSequence, int)
method to determine if a particular
character should be used as a delimiter.Constructor and Description |
---|
ArgumentCompleter.AbstractArgumentDelimiter() |
Modifier and Type | Method and Description |
---|---|
ArgumentCompleter.ArgumentList |
delimit(CharSequence buffer,
int cursor)
Break the specified buffer into individual tokens that can be completed on their own.
|
char[] |
getEscapeChars() |
char[] |
getQuoteChars() |
boolean |
isDelimiter(CharSequence buffer,
int pos)
Returns true if the specified character is a whitespace parameter.
|
abstract boolean |
isDelimiterChar(CharSequence buffer,
int pos)
Returns true if the character at the specified position if a delimiter.
|
boolean |
isEscaped(CharSequence buffer,
int pos) |
boolean |
isQuoted(CharSequence buffer,
int pos) |
void |
setEscapeChars(char[] chars) |
void |
setQuoteChars(char[] chars) |
public ArgumentCompleter.AbstractArgumentDelimiter()
public void setQuoteChars(char[] chars)
public char[] getQuoteChars()
public void setEscapeChars(char[] chars)
public char[] getEscapeChars()
public ArgumentCompleter.ArgumentList delimit(CharSequence buffer, int cursor)
ArgumentCompleter.ArgumentDelimiter
delimit
in interface ArgumentCompleter.ArgumentDelimiter
buffer
- The buffer to splitcursor
- The current position of the cursor in the bufferpublic 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)
.isDelimiter
in interface ArgumentCompleter.ArgumentDelimiter
buffer
- The complete command bufferpos
- The index of the character in the bufferpublic boolean isQuoted(CharSequence buffer, int pos)
public boolean isEscaped(CharSequence buffer, int pos)
public abstract 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 © 2008-2013 Sonatype. All Rights Reserved.