scispace - formally typeset
Open Access

Using and Reusing Aspects in AspectJ

TLDR
This paper proposes some rules of thumb, which allow to modify aspects incrementally and reuse aspect-specific code in AspectJ, and shows how the cooperation of inheritance and aspectual modification is achieved.
Abstract
One of the major benefits of Object-Oriented Programming (OOP) is, that it supports inheritance as a mechanism for code reuse and incremental modification. Wellestablished object-oriented technologies like white-box frameworks make exhaustively use of and intensively rely on inheritance. Aspect-Oriented Programming (AOP) is a new technology, which supports another extension mechanism whose intension is to enable a better separation of concerns. General-purpose aspect languages (GPAL) like AspectJ are build upon object-oriented programming languages, and in that way it is possible to combine both extension mechanisms. This paper shows that both mechanisms are in contradiction to each other. The result is, that the advantages of inheritance are no longer available. Furthermore, incremental modifications and code reuse are not directly supported for the new language features of AspectJ. So, the application of techniques like redefining aspect-specific behavior is not possible. This paper proposes some rules of thumb, which allow to modify aspects incrementally and reuse aspect-specific code in AspectJ. Moreover, this paper shows how in that way the cooperation of inheritance and aspectual modification is achieved.

read more

Content maybe subject to copyright    Report

Citations
More filters
Journal Article

An overview of AspectJ

TL;DR: AspectJ as mentioned in this paper is a simple and practical aspect-oriented extension to Java with just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns.

Refactoring of Aspect-Oriented Software

TL;DR: A number of new aspect-orientation refactorings are introduced which help on the one hand to migrate from object-oriented to aspect- oriented software and on the other hand to restructure existing aspect-oriented code.
Proceedings ArticleDOI

Runtime aspect weaving through metaprogramming

TL;DR: An extension to the Java language, Handi-Wrap, that supports weaving aspects into code at runtime, in the form of method wrappers, which allow aspect code to be inserted around method bodies like advice in AspectJ.
Proceedings ArticleDOI

Distributing classes with woven concerns: an exploration of potential fault scenarios

TL;DR: This paper will explore some of the long-term maintenance issues that can occur with AspectJ, which is an implementation of AOP for the Java programming language, which can create unexpected and potentially unsolvable problems.
Proceedings ArticleDOI

Parametric introductions

TL;DR: This paper discusses the implementations of introductions in AspectJ and Hyper/J and reveals their limitations by presenting typical examples of static crosscutting code that cannot be handled adequately by them and presents the concept of parametric introduction, which are introductions that rely on parameters that are evaluated during weavetime.
References
More filters
Book

Design Patterns: Elements of Reusable Object-Oriented Software

TL;DR: The book is an introduction to the idea of design patterns in software engineering, and a catalog of twenty-three common patterns, which most experienced OOP designers will find out they've known about patterns all along.
Book ChapterDOI

Aspect-Oriented Programming

TL;DR: An analysis of why certain design decisions have been so difficult to clearly capture in actual code is presented, and the basis for a new programming technique, called aspect-oriented programming, that makes it possible to clearly express programs involving such aspects.
Journal Article

An overview of AspectJ

TL;DR: AspectJ as mentioned in this paper is a simple and practical aspect-oriented extension to Java with just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns.
Book ChapterDOI

An Overview of AspectJ

TL;DR: AspectJ provides support for modular implementation of a range of crosscutting concerns, and simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes.
Proceedings ArticleDOI

Aspect-Oriented Programming