Package: org.codehaus.groovy.tools.shell.completion

## [Groovy] Class GroovySyntaxCompletor

- org.codehaus.groovy.tools.shell.completion.GroovySyntaxCompletor

- All Implemented Interfaces and Traits:
    Completer

      class GroovySyntaxCompletor

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

  Authors:
    Marty Saxton

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected String[]` | `classes` |
    `protected static Logger` | `log` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GroovySyntaxCompletor (Groovysh shell, ReflectionCompletor reflectionCompletor, List<IdentifierCompletor> identifierCompletors, Completer filenameCompletor)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `int` | `complete(String bufferLine, int cursor, List candidates)`
    `int` | `completeIdentifier(List<GroovySourceToken> tokens, List candidates)`
    `static org.codehaus.groovy.antlr.parser.GroovyLexer` | `createGroovyLexer(String src)`
    `static GroovySyntaxCompletor.CompletionCase` | `getCompletionCase(List<GroovySourceToken> tokens)`
    `static boolean` | `isCommand(String bufferLine, CommandRegistry registry)`
    `static boolean` | `tokenizeBuffer(String bufferLine, List<String> previousLines, List<GroovySourceToken> 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 String[] classes

    - #### protected static final Logger log

  - ### Constructor Detail

    - #### GroovySyntaxCompletor(Groovysh shell, ReflectionCompletor reflectionCompletor, List<IdentifierCompletor> identifierCompletors, Completer filenameCompletor)

  - ### Method Detail

    - #### int complete(String bufferLine, int cursor, List candidates)

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

    - #### static org.codehaus.groovy.antlr.parser.GroovyLexer createGroovyLexer(String src)

    - #### static GroovySyntaxCompletor.CompletionCase getCompletionCase(List<GroovySourceToken> tokens)

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

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

      Adds to result the identified tokens for the bufferLines

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