A very basic TokenFactory implementation.

The tokens will all have the same token index, start index and charPositionInLine (CommonToken.charPositionInLine); this factory is therefore likely not suitable for any context where the returned tokens will actually be used. However, it might be useful if you know that the tokens won’t be used, and you just need any token factory.

no subtypes hierarchy

Initializer
BasicTokenFactory()
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
tokenSource Codeshared actual CommonToken token(String text, Integer type, Integer length)

Creates a CommonToken with the specified text, type, and length.

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: TokenFactory