next up previous
Next: Overriding a pointcut designator Up: Ad-hoc Polymorphism in AspectJ Previous: Ad-hoc Polymorphism in AspectJ

Extending an aspect

It is possible to extend an abstract aspect, but not a concrete one. The concrete aspect PointTracing (Listing PointTracing.java) extends the abstract aspect ExecutingObjectTracing (Listing ExecutingObjectTracing.java). However, PointTracing cannot be further extended. This is actually a minor limitation that can be explained as an enforcement of the ``abstract superclass rule'' [16], i.e., the rule that only the leaves of an inheritance hierarchy can be concrete. Every aspect hierarchy can be transformed into one in which all super-aspects are abstract, although this is not typically required by programming languages.[*]



David H. Lorenz 2003-01-15