摘要: TRAP/J结构可以将可适应性透明地加入已有的应用程序中,不用修改应用程序源代码和虚拟机。该文提出一种新的具适应性的结构,采用包装类和AspectJ获得对原类的封装和替代,使用抽象类代表原类,避免了原结构反射的使用。实验表明,与TRAP/J相比,用该结构构成的程序在单机环境中执行速度更快,但是在网络环境下两者相当。
关键词:
适应性软件,
组合适应,
面向方面编程,
面向对象编程
Abstract: TRAP/J is a structure which can add adaptive capacity into original existed application(without modification of source code and virtual machine). This paper proposes a new architecture of adaptive Java program. Wrapper class and AspectJ are applied to enclose and replace original class, and abstract class is applied to represent original class. Experiments show that compared with TRAP/J, the running speed of program with new architecture is higher within single computer, but within networks there is no remarkable difference between two architectures.
Key words:
adaptive software,
compositional adaptation,
aspect-oriented programming,
object-oriented programming
中图分类号:
杨志辉;王小民;张 雄;许满武;. 一种新的具适应性的程序结构[J]. 计算机工程, 2008, 34(23): 47-49.
YANG Zhi-hui; WANG Xiao-min; ZHANG Xiong; XU Man-wu;. New Adaptive Program Structure[J]. Computer Engineering, 2008, 34(23): 47-49.