- All Implemented Interfaces:
public class PicocliJLineCompleter extends Object implements jline.console.completer.CompleterImplementation of the JLine 2
Completerinterface that generates completion candidates for the specified command line based on the
PicocliJLineCompleterwas constructed with.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
complete(String buffer, int cursor, List<CharSequence> candidates)Populates the specified list with completion candidates for the specified buffer based on the command specification that this shell was constructed with.
public PicocliJLineCompleter(CommandLine.Model.CommandSpec spec)Constructs a new
PicocliJLineCompleterfor the given command spec.
spec- the command specification to generate completions for. Must be non-
public int complete(String buffer, int cursor, List<CharSequence> candidates)
- Specified by:
buffer- the command line string
cursor- the position of the cursor in the command line string
candidates- the list to populate with completion candidates that would produce valid options, parameters or subcommands at the cursor position in the command line
- the cursor position in the buffer for which the completion will be relative,
-1if no completions are found