getDisplayName abstract method

String getDisplayName(
  1. int tokenType
)

Gets the display name of a token type.

ANTLR provides a default implementation of this method, but applications are free to override the behavior in any manner which makes sense for the application. The default implementation returns the first result from the following list which produces a non-null result.

  1. The result of {@link #getLiteralName}
  2. The result of {@link #getSymbolicName}
  3. The result of {@link Integer#toString}

@param tokenType The token type.

@return The display name of the token type, for use in error reporting or other user-visible messages which reference specific token types.

Implementation

String getDisplayName(int tokenType);