首页> 外文会议>International Conference on computer science education >The implementation of template method pattern by aspect based on configuration file
【24h】

The implementation of template method pattern by aspect based on configuration file

机译:基于配置文件的方面实现模板方法模式的实现

获取原文

摘要

In the implementation of template method pattern by OOP (Object Oriented Programming), an abstract class defines the program skeleton of an algorithm and some common steps, deferring other steps to subclasses. Some steps are executed before the abstract method; other steps are executed after the abstract method. Subclasses extend this abstract class and implement the abstract method. When the pattern is implemented by AOP (Aspect Oriented Programming), common steps are defined in an aspect, when a join point is captured, some methods can be executed before or after it. This class doesn't need to extend one abstract class. The implementation is simple and noninvasive. But users need to know aspect language. This paper provides a novel method to implement this pattern: join point, after advice, and before advice are defined in a configuration file. On the basis of analyzing the AOP implementation of template method pattern, the paper discusses how to define these configurations. A program generates aspects based on the configuration file, then compiles, weaves. So users may use AOP implementation without knowing any Aspect.
机译:在通过OOP(面向对象编程)的模板方法模式的实现中,抽象类定义了算法的程序骨架和一些常见步骤,推迟了子类的其他步骤。在抽象方法之前执行一些步骤;在抽象方法之后执行其他步骤。子类扩展了这个抽象类并实现了抽象方法。当模式由AOP实现(方面取向编程)时,在捕获连接点时,在一个方面定义公共步骤,在捕获连接点时,可以在之前或之后执行一些方法。此类不需要扩展一个抽象类。实施简单而非冒险。但是用户需要了解纵横语言。本文提供了一种实现此模式的新方法:在建议之后,建议和建议在配置文件中定义之前。在分析模板方法模式的AOP实现的基础上,讨论了如何定义这些配置。程序基于配置文件生成方面,然后编译,编译。因此,用户可以在不知道任何方面的情况下使用AOP实现。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号