摘要
对当前软件重构领域中的研究作了概括性介绍。对作为重构的主导思想和系统体系结构的总体转换方向的设计模式进行介绍,针对原有的Visitor设计模式在运行中操作调用频繁时资源消耗过大和运行效率降低的不足,在原模式基础上进行改良和优化,生成一种新的设计模式Visitor,并对其具体分析,通过操作函数的上移和accept方法的重定义,实现了操作定义由Element层到Visitor层的等价转化,大大节省资源和提高运行效率。最后运用Visitor实现了一个面向对象设计过程中的重构,并结合一些重要概念对其进行具体分析。
A relatively concise introduction of existing research in the field of software refactoring is generally provided. Design pattern as the primary idea for refactoring and the whole transformation direction of system architecture is illustrated. Based on previous Visitor design pattern, a new design pattern called Visitor^* is designed aiming at the disadvantage of excessive resource consuming and running efficiency decreasing due to frequently called operation in running and make a concrete demonstration of it, the Element-to-Visitor hierarchy equal transformation of the operate definition is realized by moving operate function and redefining accept method, is reduced and running is enhanced. Finally it is applied in realizing the refactoring in an object-oriented programming and analyzed concretely on other main concepts.
出处
《计算机工程与设计》
CSCD
北大核心
2006年第24期4817-4820,共4页
Computer Engineering and Design
关键词
重构技术
形式化方法
重构工具
设计模式
类层次体系架构
refactoring techniques
formalisms for refactoring
refactoring tools
design pattern
class hierarchy architecture