chp04/src/main/java/me/zhhe/exercise/antlr/book/chp04/ExtractInterfaceListener.java
/** Listen to matches of importDeclaration. */
Listen to matches of importDeclaration.
Listen to matches of importDeclaration .
@Override
    public void enterImportDeclaration(JavaParser.ImportDeclarationContext ctx) {
        System.out.println(parser.getTokenStream().getText(ctx));
    }
@ Override public void enterImportDeclaration ( JavaParser . ImportDeclarationContext ctx ) { System . out . println ( parser . getTokenStream ( ) . getText ( ctx ) ) ; }
Listen to matches of importDeclaration.
Listen to matches of importDeclaration .
//        System.out.format("import %s;%n", ctx.qualifiedName().getText());