Ann:一种用于有效设计和验证Java注释的领域特定语言
Ann: A domain-specific language for the effective design and validation of Java annotations
摘要:
本文介绍了一种新的建模语言,有效的设计和验证的Java注释。自从被纳入Java第5版以来,注释已经从一个添加元数据的有用工具发展成为许多流行软件项目的核心角色。它们通常不是孤立地设想的,而是成组地设想的,它们之间有依赖性和完整性的限制。然而,Java为表达这种设计提供的本地支持非常有限。为了克服它的不足之处,并明确丰富的概念模型背后的一组注释,我们提出了一个特定领域的建模语言。该提案已被实现为Eclipse插件,包括一个编辑器和一个集成的代码生成器,它可以合成注释处理器。该环境还集成了一个模型查找器,能够检测不同注释之间的不可满足的约束,并提供正确的注释用法的示例进行验证。该语言已经使用Java Persistence API(JPA)的一组真实注释进行了测试。在这个子集中,我们发现了足够丰富的语义,可以用Ann表达,而现在被Java语言省略了,这表明了Ann在相关应用领域的好处。
英文摘要:
This paper describes a new modelling language for the effective design and validation of Java annotations. Since their inclusion in the 5th edition of Java, annotations have grown from a useful tool for the addition of meta-data to play a central role in many popular software projects. Usually they are not conceived in isolation, but in groups, with dependency and integrity constraints between them. However, the native support provided by Java for expressing this design is very limited. To overcome its deficiencies and make explicit the rich conceptual model which lies behind a set of annotations, we propose a domain-specific modelling language. The proposal has been implemented as an Eclipse plug-in, including an editor and an integrated code generator that synthesises annotation processors. The environment also integrates a model finder, able to detect unsatisfiable constraints between different annotations, and to provide examples of correct annotation usages for validation. The language has been tested using a real set of annotations from the Java Persistence API (JPA). Within this subset we have found enough rich semantics expressible with Ann and omitted nowadays by the Java language, which shows the benefits of Ann in a relevant field of application.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。