A per-type Instantiation Mechanism for Generic Aspects

We propose a per-type instantiation mechanism for generic aspects. Generic pointcuts that specify join points of different return types are proposed, but when a return type of a piece of around advice is not generic, generic pointcuts cannot be used in the advice. Although we can declare generic aspects in AspectJ 5, generic aspects must be abstract and concrete aspects which extend the generic aspect must be declared, therefore generic pointcuts cannot be used in generic aspects. Our per-type instantiation mechanism creates an instance of a generic aspect for each type. And when a piece of advice is executed, the mechanism selects an instance according to the static types of the join points.

Members

Publications

  • Manabu Toyama, Tomoyuki Aotani, and Hidehiko Masuhara, A Per-type Instantiation Mechanism for Generic Aspects
    • 3rd International Workshop on Variability & Composition (VariComp’12), March 2012.
  • Manabu Toyama and Tomoyuki Aotani, Generic Aspects with per-type Aspect Instantiation
    • 25th European Conference on Object-Oriented Programming (ECOOP2011), July 2011.
    • poster presentation. abstract poster

Compiler