Community
Participate
Working Groups
After fixing the NPE for bug 268689, we compile this code: package none; public aspect ConcreteAspect extends GenericAspect<String> { } package none; public abstract aspect GenericAspect<T> { interface SomeInterface { } pointcut SomeConstructor(SomeInterface var) : execution(* SomeInterface(..)) && this(var); } "parameterized types not supported for this and target pointcuts (erasure limitation)" It is considered parameterized when resolved through the concrete sub-aspect which defines T as String.
fixed this. And noticed whilst creating a real runnable test case that the syntax of the pointcut is actually wrong for catching constructor calls, it should be: execution(SomeInterface+.new(..)) and not execution(* SomeInterface(..)) The problem that needed fixing is that member types of a generic type are considered parameterized (inheriting the parameterization of their containing type) but this shouldn't be for interfaces.