Class ArgumentCompleter.AbstractArgumentDelimiter

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      ArgumentCompleter.ArgumentList delimit​(java.lang.CharSequence buffer, int cursor)
      Break the specified buffer into individual tokens that can be completed on their own.
      char[] getEscapeChars()  
      char[] getQuoteChars()  
      boolean isDelimiter​(java.lang.CharSequence buffer, int pos)
      Returns true if the specified character is a whitespace parameter.
      abstract boolean isDelimiterChar​(java.lang.CharSequence buffer, int pos)
      Returns true if the character at the specified position if a delimiter.
      boolean isEscapeChar​(java.lang.CharSequence buffer, int pos)
      Check if this character is a valid escape char (i.e.
      boolean isEscaped​(java.lang.CharSequence buffer, int pos)
      Check if a character is escaped (i.e.
      boolean isQuoteChar​(java.lang.CharSequence buffer, int pos)  
      boolean isQuoted​(java.lang.CharSequence buffer, int pos)  
      void setEscapeChars​(char[] chars)  
      void setQuoteChars​(char[] chars)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractArgumentDelimiter

        public AbstractArgumentDelimiter()
    • Method Detail

      • setQuoteChars

        public void setQuoteChars​(char[] chars)
      • getQuoteChars

        public char[] getQuoteChars()
      • setEscapeChars

        public void setEscapeChars​(char[] chars)
      • getEscapeChars

        public char[] getEscapeChars()
      • isQuoted

        public boolean isQuoted​(java.lang.CharSequence buffer,
                                int pos)
      • isQuoteChar

        public boolean isQuoteChar​(java.lang.CharSequence buffer,
                                   int pos)
      • isEscapeChar

        public boolean isEscapeChar​(java.lang.CharSequence buffer,
                                    int pos)
        Check if this character is a valid escape char (i.e. one that has not been escaped)
      • isEscaped

        public boolean isEscaped​(java.lang.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.
      • isDelimiterChar

        public abstract boolean isDelimiterChar​(java.lang.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(java.lang.CharSequence, int) instead.