作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2006, Vol. 32 ›› Issue (19): 100-102. doi: 10.3969/j.issn.1000-3428.2006.19.036

• 软件技术与数据库 • 上一篇    下一篇

基于扩展UML的面向方面的建模

郭东亮,张立臣   

  1. (广东工业大学计算机学院,广州 510090)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2006-10-05 发布日期:2006-10-05

Modeling of Aspect-oriented by Extending UML

GUO Dongliang, ZHANG Lichen   

  1. (Faculty of Computer, Guangdong University of Technology, Guangzhou 510090)
  • Received:1900-01-01 Revised:1900-01-01 Online:2006-10-05 Published:2006-10-05

摘要: 提出了一个新的扩展UML进行面向方面建模的方法,它以合适的语义表达了AspectJ和AspectC++的元素和织入机制。在这个方法中,方面继承自类,切入点和通知继承自特征,这样切入点和通知是方面的一部分,方面与基本类的关系用横切依赖表示。切入点的图符可以表达多个方面在相同连接点的横切行为,通知以一致的方式建模结构横切和行为横切,通过在顺序图上新加一个通知发出焦点,并通知表示为消息,这样可以清晰建模通知在何时何处怎样影响系统的行为。

关键词: 面向方面编程, 面向方面建模, AspectJ, AspectC++, UML

Abstract: This article proposes a new technique to model aspect-oriented constructs and mechanisms by extending UML, which can represent constructs and weaving mechanism of AspectJ and AspectC++ with appropriate semantics. In this method, aspect is subclass of class; pointcut and advice are derived from feature, thus pointcut and advice are parts of aspect; relationship between aspects and base classes is represented by special crosscut dependency. The notation of pointcut can express crosscutting behavior of many aspects at same join point. Advice can model structural crosscutting and behavior crosscutting in a uniform way. By adding a new block, advice sending focus, in sequence diagram and regard advice as message, this method can clearly model where and when and how advices affect system behavior.

Key words: AOP, AOM, AspectJ, AspectC++, UML

中图分类号: