jline

Interface ArgumentCompletor.ArgumentDelimiter

Known Implementing Classes:
ArgumentCompletor.AbstractArgumentDelimiter, ArgumentCompletor.WhitespaceArgumentDelimiter

public static interface ArgumentCompletor.ArgumentDelimiter

The ArgumentCompletor.ArgumentDelimiter allows custom breaking up of a String into individual arguments in order to dispatch the arguments to the nested Completor.
Author:
Marc Prud'hommeaux

Method Summary

ArgumentCompletor.ArgumentList
delimit(String buffer, int argumentPosition)
Break the specified buffer into individual tokens that can be completed on their own.
boolean
isDelimiter(String buffer, int pos)
Returns true if the specified character is a whitespace parameter.

Method Details

delimit

public ArgumentCompletor.ArgumentList delimit(String buffer,
                                              int argumentPosition)
Break the specified buffer into individual tokens that can be completed on their own.
Parameters:
buffer - the buffer to split
argumentPosition - the current position of the cursor in the buffer
Returns:
the tokens

isDelimiter

public boolean isDelimiter(String buffer,
                           int pos)
Returns true if the specified character is a whitespace parameter.
Parameters:
buffer - the complete command buffer
pos - the index of the character in the buffer
Returns:
true if the character should be a delimiter