Consider the following:
When class C is used by java sources, the joint compiler / stub generator creates an error for the java source. I was only able to work around this by changing "Class<T>" to "Class" which is no longer type-safe. In the case of the example given in the comments of
GROOVY-10122 where the type parameter T is the type of the constructor parameter, it would need to be changed to Object.