DocumentCode
2168715
Title
The implementation of template method pattern by aspect based on configuration file
Author
Jicheng, Liu
Author_Institution
Institute of Information Science and Engineer, Henan University of Technology, Zhengzhou, China
fYear
2015
fDate
22-24 July 2015
Firstpage
359
Lastpage
364
Abstract
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.
Keywords
Algorithm design and analysis; Arrays; Java; Skeleton; Timing; Weaving; AOP; Template Method Pattern; advice; configuration file; join point;
fLanguage
English
Publisher
ieee
Conference_Titel
Computer Science & Education (ICCSE), 2015 10th International Conference on
Conference_Location
Cambridge, United Kingdom
Print_ISBN
978-1-4799-6598-4
Type
conf
DOI
10.1109/ICCSE.2015.7250271
Filename
7250271
Link To Document