Package: org.apache.groovy.groovysh.completion.antlr4

## [Groovy] Class GroovySyntaxCompleter

- org.apache.groovy.groovysh.completion.antlr4.GroovySyntaxCompleter

- All Implemented Interfaces and Traits:
    jline.console.completer.Completer

      class GroovySyntaxCompleter
      extends Object
      implements jline.console.completer.Completer

  Implements the Completer interface to provide completions for GroovyShell by tokenizing the buffer and invoking other classes depending on the tokens found.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static enum` | `GroovySyntaxCompleter.CompletionCase` |
    `static class` | `GroovySyntaxCompleter.InStringException` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static Logger` | `LOG` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovySyntaxCompleter(Groovysh shell, ReflectionCompleter reflectionCompleter, IdentifierCompleter classnameCompleter, List<IdentifierCompleter> identifierCompleters, jline.console.completer.Completer filenameCompleter)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `int` | `complete(String bufferLine, int cursor, List<CharSequence> candidates)`
    `` | `int` | `completeIdentifier(List<Token> tokens, List<CharSequence> candidates)`
    `` | `static Object` | `createTokenStream(String text)`
    `` | `static GroovySyntaxCompleter.CompletionCase` | `getCompletionCase(List<Token> tokens)`
    `` | `static boolean` | `isCommand(String bufferLine, CommandRegistry registry)`
    `` | `static boolean` | `tokenizeBuffer(String bufferLine, List<String> previousLines, List<Token> result)` Adds to result the identified tokens for the bufferLines

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected static final Logger LOG

  - ### Constructor Detail

    - #### GroovySyntaxCompleter(Groovysh shell, ReflectionCompleter reflectionCompleter, IdentifierCompleter classnameCompleter, List<IdentifierCompleter> identifierCompleters, jline.console.completer.Completer filenameCompleter)

  - ### Method Detail

    - #### @Override int complete(String bufferLine, int cursor, List<CharSequence> candidates)

    - #### int completeIdentifier(List<Token> tokens, List<CharSequence> candidates)

    - #### static Object createTokenStream(String text)

    - #### static GroovySyntaxCompleter.CompletionCase getCompletionCase(List<Token> tokens)

    - #### static boolean isCommand(String bufferLine, CommandRegistry registry)

    - #### static boolean tokenizeBuffer(String bufferLine, List<String> previousLines, List<Token> result)

      Adds to result the identified tokens for the bufferLines

      Parameters:
        bufferLine
        previousLines
        result
      Returns:
        true if lexing was successful