public static abstract class

ArgumentCompleter.AbstractArgumentDelimiter

extends Object
implements ArgumentCompleter.ArgumentDelimiter
java.lang.Object
   ↳ jline.console.completer.ArgumentCompleter.AbstractArgumentDelimiter
Known Direct Subclasses

Class Overview

Abstract implementation of a delimiter that uses the isDelimiter(CharSequence, int) method to determine if a particular character should be used as a delimiter.

Summary

Public Constructors
ArgumentCompleter.AbstractArgumentDelimiter()
Public Methods
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 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)
void setEscapeChars(char[] chars)
void setQuoteChars(char[] chars)
[Expand]
Inherited Methods
From class java.lang.Object
From interface jline.console.completer.ArgumentCompleter.ArgumentDelimiter

Public Constructors

public ArgumentCompleter.AbstractArgumentDelimiter ()

Public Methods

public ArgumentCompleter.ArgumentList delimit (CharSequence buffer, int cursor)

Break the specified buffer into individual tokens that can be completed on their own.

Parameters
buffer The buffer to split
cursor The current position of the cursor in the buffer
Returns
  • The tokens

public char[] getEscapeChars ()

public char[] getQuoteChars ()

public boolean isDelimiter (CharSequence 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 getQuoteChars(), and is not escaped by ant of the getEscapeChars(), and returns true from isDelimiterChar(CharSequence, int).

Parameters
buffer The complete command buffer
pos The index of the character in the buffer
Returns
  • True if the character should be a delimiter

public abstract boolean isDelimiterChar (CharSequence 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 getQuoteChars(), and is not escaped by ant of the getEscapeChars(). To perform escaping manually, override isDelimiter(CharSequence, int) instead.

public boolean isEscapeChar (CharSequence buffer, int pos)

Check if this character is a valid escape char (i.e. one that has not been escaped)

public boolean isEscaped (CharSequence buffer, int pos)

Check if a character is escaped (i.e. if the previous character is an escape)

Parameters
buffer the buffer to check in
pos the position of the character to check
Returns
  • true if the character at the specified position in the given buffer is an escape character and the character immediately preceding it is not an escape character.

public boolean isQuoteChar (CharSequence buffer, int pos)

public boolean isQuoted (CharSequence buffer, int pos)

public void setEscapeChars (char[] chars)

public void setQuoteChars (char[] chars)