程序包 jline

接口 Completor

所有已知实现类:
ArgumentCompletor, ClassNameCompletor, FileNameCompletor, MultiCompletor, NullCompletor, SimpleCompletor

public interface Completor
A Completor is the mechanism by which tab-completion candidates will be resolved.
作者:
Marc Prud'hommeaux
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    complete(String buffer, int cursor, List candidates)
    Populates candidates with a list of possible completions for the buffer.
  • 方法详细资料

    • complete

      int complete(String buffer, int cursor, List candidates)
      Populates candidates with a list of possible completions for the buffer. The candidates list will not be sorted before being displayed to the user: thus, the complete method should sort the List before returning.
      参数:
      buffer - the buffer
      candidates - the List of candidates to populate
      返回:
      the index of the buffer for which the completion will be relative