摘要: 采用代码生成技术能大幅提高软件开发的质量和生产率,降低软件开发的风险。目前,大多数代码生成器由于灵活性欠佳,不能完 全满足软件开发的实际需要,难以在软件开发项目中得到充分的应用。该文讨论的代码生成器Generator是一个基于Java的代码生成工具,它 支持多种类型的数据库设计模型,允许用户自定义代码模板和代码生成任务,适合生成基于数据库模型的任意形式的代码及相关的文本文 件,具有广泛的通用性。
关键词:
代码生成,
模型驱动架构,
XML,
Velocity,
UML,
设计模式
Abstract: Code generating technology can improve the quality and productivity of software development by a wide margin, and lower the risk of software development. At present, most code generators flexibility is not good enough, this can't totally meet software development's needs and is difficult to get rich application in software development. The generator discussed in this text is a code generator tool based on Java, it supports many types of data model definition as input, user-defined code template, and user-defined code generating task. It is so universal that it can generate any types of code and other text files based on the data model.
中图分类号:
万军民. 基于Java的代码生成器的设计与实现[J]. , 2004, 30(S1): 134-136.
WAN Junmin. Design and Implementation of Code Generator Based on Java[J]. , 2004, 30(S1): 134-136.