摘要
随着AOP技术的日渐成熟,面向方面建模(AOM)已成为当前研究的热点。AOM利用建模语言为系统进行基于AO的分析和表示,允许开发人员在系统开发与设计的初始阶段就将问题分解为核心组件与横切组件,并将横切关注点模块化独立的aspect,这可使系统结构更加清晰,为下一个阶段的代码生成、系统维护带来便利和保障。本文利用UML的可扩展性,提出了一种基于AspectJ语法概念,通过扩展UML元模型元素来支持AO建模的方法。谊方法利用UML自身的扩展机制(版类、标签值和约束),对class、association等元模型元素进行扩充,分别表达AspectJ系统模型中的aspect、pointcut等概念。最后利用Rational Rose CASE工具包对该方法进行了验证,并通过编制的脚本为模型中的aspect生成了AspectJ语法格式的代码框架。
With the gradual perfection of Aspect Oriented Programming, recent researches have been focusing on Aspect Oriented Modeling (AOM). In this paper, based on extension mechanisms of the unified modeling language (UML), sush as stereotypes, tagged values and constraints, we propose a UML extension for modeling AO systems characterized by AspectJ constructs and supporting AspectJ system modeling by extending UML meta-model elements. To describe aspects and pointcuts and other notions in AspectJ system, this approach extends the 'Class', 'association' and other UML meta-model elements, and it is also tested here by using Rational Rose CASE tool package. Using Rose Script we compiled to generate an AspectJ skeleton for the aspect-diagram for the model designed using the proposed extension.
出处
《计算机科学》
CSCD
北大核心
2004年第12期196-198,201,共4页
Computer Science
基金
重庆市教委科学技术研究项目(项目号:030201)