CompletingParsedLine
, ParsedLine
public class DefaultParser.ArgumentList extends Object implements ParsedLine, CompletingParsedLine
Constructor | Description |
---|---|
ArgumentList(String line,
List<String> words,
int wordIndex,
int wordCursor,
int cursor) |
Deprecated.
|
ArgumentList(String line,
List<String> words,
int wordIndex,
int wordCursor,
int cursor,
String openingQuote,
int rawWordCursor,
int rawWordLength) |
Modifier and Type | Method | Description |
---|---|---|
int |
cursor() |
The cursor position within the line.
|
CharSequence |
escape(CharSequence candidate,
boolean complete) |
|
String |
line() |
The unparsed line.
|
int |
rawWordCursor() |
|
int |
rawWordLength() |
|
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.
|
List<String> |
words() |
The list of words.
|
@Deprecated public ArgumentList(String line, List<String> words, int wordIndex, int wordCursor, int cursor)
public ArgumentList(String line, List<String> words, int wordIndex, int wordCursor, int cursor, String openingQuote, int rawWordCursor, int rawWordLength)
line
- the command line being editedwords
- the list of wordswordIndex
- the index of the current word in the list of wordswordCursor
- the cursor position within the current wordcursor
- the cursor position within the lineopeningQuote
- the opening quote (usually '\"' or '\'') or nullrawWordCursor
- the cursor position inside the raw word (i.e. including quotes and escape characters)rawWordLength
- the raw word length, including quotes and escape characterspublic int wordIndex()
ParsedLine
wordIndex
in interface ParsedLine
public String word()
ParsedLine
word
in interface ParsedLine
public int wordCursor()
ParsedLine
wordCursor
in interface ParsedLine
public List<String> words()
ParsedLine
words
in interface ParsedLine
public int cursor()
ParsedLine
cursor
in interface ParsedLine
public String line()
ParsedLine
line
in interface ParsedLine
public CharSequence escape(CharSequence candidate, boolean complete)
escape
in interface CompletingParsedLine
public int rawWordCursor()
rawWordCursor
in interface CompletingParsedLine
public int rawWordLength()
rawWordLength
in interface CompletingParsedLine
Copyright © 2020. All rights reserved.