- All Implemented Interfaces:
- javax.inject.Provider<T>
public class LexerProvider<T extends org.antlr.runtime.Lexer>
extends java.lang.Object
implements com.google.inject.Provider<T>
A Guice provider implementation, that does not use the default constructor of
the lexer class, but call the other available constructor that takes a CharStream as argument.
This provider is a workaround for a bug in ANTLR that leads to partially initialized
Lexer instances. They may cause NullPointerExceptions in some rare situations, when
backtracking is involved.
- Author:
- Sebastian Zarnekow - Initial contribution and API