Constructs a new {@link CommonToken} with the specified token type.
Constructs a new {@link CommonToken} with the specified token type and text.
Constructs a new {@link CommonToken} as a copy of another {@link Token}. * <p> If {@code oldToken} is also a {@link CommonToken} instance, the newly constructed token will share a reference to the {@link #text} field and the {@link Pair} stored in {@link #source}. Otherwise, {@link #text} will be assigned the result of calling {@link #getText}, and {@link #source} will be constructed from the result of {@link Token#getTokenSource} and {@link Token#getInputStream}.</p>
@uml @override
@uml @override
@uml @override
@uml @override
@uml @override
@uml @override
@uml @override
@uml @override
Explicitly set the text for this token. If {code text} is not {@code null}, then {@link #getText} will return this value rather than extracting the text from the input.
@uml @override
@uml @override
@uml @override
An empty {@link Pair} which is used as the default value of {@link #source} for tokens that do not have a source.
This is the backing field for {@link #getChannel} and {@link #setChannel}.
This is the backing field for {@link #getCharPositionInLine} and {@link #setCharPositionInLine}.
This is the backing field for {@link #getTokenIndex} and {@link #setTokenIndex}.
This is the backing field for {@link #getLine} and {@link #setLine}.
This is the backing field for {@link #getTokenSource} and {@link #getInputStream}.
This is the backing field for {@link #getStartIndex} and {@link #setStartIndex}. @uml @read @write
This is the backing field for {@link #getStopIndex} and {@link #setStopIndex}. @uml @read @write
This is the backing field for {@link #getText} when the token text is explicitly set in the constructor or via {@link #setText}.
This is the backing field for {@link #getType} and {@link #setType}.
TODO add class description