We create antlr4 plugin factory via the following code in `Antlr4Util`:

Antlr4PluginFactory antlr4PluginFactory = (Antlr4PluginFactory)
ParserPluginFactory.antlr4(configuration);


The `antlr4` method is `static`,  its implementation is to `new
Antlr4PluginFactory`  instance, and the method can not be overrided by
`ParserPluginFactory` subclasses.  

public static ParserPluginFactory antlr4(CompilerConfiguration
compilerConfiguration) {
        return new Antlr4PluginFactory(compilerConfiguration);
    }
 

So I wonder how to reproduce the `java.lang.ClassCastException`...

Cheers,
Daniel.Sun




-----
Apache Groovy committer & PMC member 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Reply via email to