Community
Participate
Working Groups
I just try the pertypewithin to instantiate an aspect per class. This works: public aspect TestAspekt<T> pertypewithin(verwaltung.test.*) { ... after() : execution(* *.*()) { log.debug(thisJoinPoint); } } But when I try to use the generic <T> inside the after advice as described in the AspectJ developer's notebook it does not work. public aspect TestAspekt<T> pertypewithin(verwaltung.test.*) { ... after(T t) : execution(* *.*()) && this(t) { ... } Each time I try to save this I get an alert box with "NullPointerException thrown: null" (also repeated as reason).
Basic generics will be working in M3, we'll have a look at this (parameterized aspects with PTW) for 1.5.0 final.
We've decided to remove this feature from the language for the 1.5.0 timeframe (a concrete generic pertypewithin aspect). Generic abstract aspects *will* be supported in M4.
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.