Class DefaultParser.ArgumentList

    • Constructor Summary

      Constructors 
      Constructor Description
      ArgumentList​(java.lang.String line, java.util.List<java.lang.String> words, int wordIndex, int wordCursor, int cursor)
      Deprecated.
      ArgumentList​(java.lang.String line, java.util.List<java.lang.String> words, int wordIndex, int wordCursor, int cursor, java.lang.String openingQuote, int rawWordCursor, int rawWordLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int cursor()
      The cursor position within the line.
      java.lang.CharSequence escape​(java.lang.CharSequence candidate, boolean complete)  
      java.lang.String line()
      The unparsed line.
      int rawWordCursor()  
      int rawWordLength()  
      java.lang.String word()
      The current word being completed.
      int wordCursor()
      The cursor position within the current word.
      int wordIndex()
      The index of the current word in the list of words.
      java.util.List<java.lang.String> words()
      The list of words.
      • Methods inherited from class java.lang.Object

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

      • line

        private final java.lang.String line
      • words

        private final java.util.List<java.lang.String> words
      • wordIndex

        private final int wordIndex
      • wordCursor

        private final int wordCursor
      • cursor

        private final int cursor
      • openingQuote

        private final java.lang.String openingQuote
      • rawWordCursor

        private final int rawWordCursor
      • rawWordLength

        private final int rawWordLength
    • Constructor Detail

      • ArgumentList

        @Deprecated
        public ArgumentList​(java.lang.String line,
                            java.util.List<java.lang.String> words,
                            int wordIndex,
                            int wordCursor,
                            int cursor)
        Deprecated.
      • ArgumentList

        public ArgumentList​(java.lang.String line,
                            java.util.List<java.lang.String> words,
                            int wordIndex,
                            int wordCursor,
                            int cursor,
                            java.lang.String openingQuote,
                            int rawWordCursor,
                            int rawWordLength)
        Parameters:
        line - the command line being edited
        words - the list of words
        wordIndex - the index of the current word in the list of words
        wordCursor - the cursor position within the current word
        cursor - the cursor position within the line
        openingQuote - the opening quote (usually '\"' or '\'') or null
        rawWordCursor - the cursor position inside the raw word (i.e. including quotes and escape characters)
        rawWordLength - the raw word length, including quotes and escape characters
    • Method Detail

      • wordIndex

        public int wordIndex()
        Description copied from interface: ParsedLine
        The index of the current word in the list of words.
        Specified by:
        wordIndex in interface ParsedLine
        Returns:
        the index of the current word in the list of words
      • word

        public java.lang.String word()
        Description copied from interface: ParsedLine
        The current word being completed. If the cursor is after the last word, an empty string is returned.
        Specified by:
        word in interface ParsedLine
        Returns:
        the word being completed or an empty string
      • wordCursor

        public int wordCursor()
        Description copied from interface: ParsedLine
        The cursor position within the current word.
        Specified by:
        wordCursor in interface ParsedLine
        Returns:
        the cursor position within the current word
      • words

        public java.util.List<java.lang.String> words()
        Description copied from interface: ParsedLine
        The list of words.
        Specified by:
        words in interface ParsedLine
        Returns:
        the list of words
      • cursor

        public int cursor()
        Description copied from interface: ParsedLine
        The cursor position within the line.
        Specified by:
        cursor in interface ParsedLine
        Returns:
        the cursor position within the line
      • line

        public java.lang.String line()
        Description copied from interface: ParsedLine
        The unparsed line.
        Specified by:
        line in interface ParsedLine
        Returns:
        the unparsed line
      • escape

        public java.lang.CharSequence escape​(java.lang.CharSequence candidate,
                                             boolean complete)
        Specified by:
        escape in interface CompletingParsedLine