eclipse - 在 Eclipse 中清理项目时 Groovy AST 转换出错

标签 eclipse groovy

我正在尝试通过 groovy 的 Implementing Local AST Transformations 进行工作教程,但每当我清理项目时,我都会在每个包含 @WithLogging 注释的文件中收到此错误:

Groovy:Could not find class for Transformation Processor AC.LoggingASTTransformation declared by AC.WithLogging

最佳答案

所以你有一个名为“AC”的包,其中包含“WithLogging.groovy”和“LoggingASTTransformation.groovy”类?它是否还包含任何实现“WithLogging”接口(interface)的类?

如果是这样,我建议您将使用注释的类移动到注释定义包之外的位置(出于诊断目的,默认值就足够了) - 编译顺序与转换有关。请参阅this post在 groovy 用户邮件列表上了解更多信息。

另外尝试将注释从@WithLogging更改为@AC.WithLogging。

就使用 Eclipse 进行清理而言,我遇到了类似的问题,并且发现在清理包含我的注释的任何文件后我必须进行一些简单的修改。 IE,在某处添加一个空格。然后保存文件。这应该正确地重建一切。

关于eclipse - 在 Eclipse 中清理项目时 Groovy AST 转换出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4476306/

相关文章:

eclipse - 关于 Poky 中 tcf-agent_git.bb 中的错误 URI

java - 如何撤消运行配置中所做的更改

groovy - 如何在 Groovy 中做到这一点?

jenkins - 在 dir() jenkins 管道中传递变量路径

eclipse - 在hadoop上运行kmeans时PriviledgedActionException

java - 基于 java-eclipse linux 的 Opencv native 位置设置

java - Eclipse 崩溃并显示引用计数错误消息 cairo_surface_destroy

Groovy shell 在 show 和 purge 命令上返回错误

java - GRAILS:永久链接/slug 生成方法?

maven - gmaven 插件 : how to set property in pom. 用于外部 groovy 脚本的 xml