Callback boilerplate for the Java lexer.