Class SimpleCompletor

java.lang.Object
org.codehaus.groovy.tools.shell.util.SimpleCompletor
All Implemented Interfaces:
Cloneable, jline.console.completer.Completer

public class SimpleCompletor extends Object implements jline.console.completer.Completer, Cloneable
  • Constructor Details

    • SimpleCompletor

      public SimpleCompletor()
    • SimpleCompletor

      public SimpleCompletor(String candidateString)
      Create a new SimpleCompletor with a single possible completion values.
    • SimpleCompletor

      public SimpleCompletor(String[] candidateStrings)
      Create a new SimpleCompletor with a list of possible completion values.
    • SimpleCompletor

      public SimpleCompletor(String[] strings, SimpleCompletor.SimpleCompletorFilter filter)
    • SimpleCompletor

      public SimpleCompletor(Reader reader) throws IOException
      Complete candidates using the contents of the specified Reader.
      Throws:
      IOException
    • SimpleCompletor

      public SimpleCompletor(InputStream in) throws IOException
      Complete candidates using the whitespearated values in read from the specified Reader.
      Throws:
      IOException
    • SimpleCompletor

      public SimpleCompletor(Closure loader)
  • Method Details

    • add

      public void add(String candidate)
    • leftShift

      public Object leftShift(String s)
    • complete

      public int complete(String buffer, int cursor, List clist)
      Specified by:
      complete in interface jline.console.completer.Completer
    • setDelimiter

      public void setDelimiter(String delimiter)
    • getDelimiter

      public String getDelimiter()
    • setCandidates

      public void setCandidates(SortedSet candidates)
    • getCandidates

      public SortedSet getCandidates()
    • setCandidateStrings

      public void setCandidateStrings(String[] strings)
    • addCandidateString

      public void addCandidateString(String candidateString)
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException