GROOVY-6258: groovydoc information loss when using generics (handle slightly different AST for Java files)