The Groovy parser does not handle method signatures beginning with Generic information...
It parses if you add the public modifier:
interface A {
public <T> T getByClass( Class<T> clazz )
}
Though I don't believe you'll gain any type checking at compile time for adding this annotation