jdgilday
jdgilday

Reputation: 886

Groovy cannot implement Java interfaces which use inheritence and generics

I am working with a Java package which defines some generic interfaces. I would like to implement these interfaces with Groovy classes in a separate project. The Groovy compiler chokes and reports that I have not implemented the interface. The Java equivalent of the Groovy code works fine.

I've accepted that the Groovy compiler will not support what I'm trying to do so I'll find another way but I would still like to know why it's failing.

I have an example Maven project which demonstrates this problem on Github https://github.com/gilday/groovy-java-generics

Upvotes: 0

Views: 1106

Answers (1)

Andrew Eisenberg
Andrew Eisenberg

Reputation: 28757

I don't know for certain, but it may be that the Java stubs for Groovy are not being generated properly. You can try using the groovy-eclipse-compiler instead. See here:

http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven

Upvotes: 1

Related Questions