jline

Class ArgumentCompletor.AbstractArgumentDelimiter

public abstract static class ArgumentCompletor.AbstractArgumentDelimiter extends Object implements ArgumentCompletor.ArgumentDelimiter

Abstract implementation of a delimiter that uses the AbstractArgumentDelimiter method to determine if a particular character should be used as a delimiter.

Author: Marc Prud'hommeaux

Method Summary
ArgumentCompletor.ArgumentListdelimit(String buffer, int cursor)
char[]getEscapeChars()
char[]getQuoteChars()
booleanisDelimiter(String buffer, int pos)
Returns true if the specified character is a whitespace parameter.
abstract booleanisDelimiterChar(String buffer, int pos)
Returns true if the character at the specified position if a delimiter.
booleanisEscaped(String buffer, int pos)
booleanisQuoted(String buffer, int pos)
voidsetEscapeChars(char[] escapeChars)
voidsetQuoteChars(char[] quoteChars)

Method Detail

delimit

public ArgumentCompletor.ArgumentList delimit(String buffer, int cursor)

getEscapeChars

public char[] getEscapeChars()

getQuoteChars

public char[] getQuoteChars()

isDelimiter

public boolean isDelimiter(String buffer, int pos)
Returns true if the specified character is a whitespace parameter. Check to ensure that the character is not escaped by any of AbstractArgumentDelimiter, and is not escaped by ant of the AbstractArgumentDelimiter, and returns true from AbstractArgumentDelimiter.

Parameters: buffer the complete command buffer pos the index of the character in the buffer

Returns: true if the character should be a delimiter

isDelimiterChar

public abstract boolean isDelimiterChar(String buffer, int pos)
Returns true if the character at the specified position if a delimiter. This method will only be called if the character is not enclosed in any of the AbstractArgumentDelimiter, and is not escaped by ant of the AbstractArgumentDelimiter. To perform escaping manually, override AbstractArgumentDelimiter instead.

isEscaped

public boolean isEscaped(String buffer, int pos)

isQuoted

public boolean isQuoted(String buffer, int pos)

setEscapeChars

public void setEscapeChars(char[] escapeChars)

setQuoteChars

public void setQuoteChars(char[] quoteChars)
Copyright © 2002-2010. All Rights Reserved.