Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Constructor calls of classes that implement a given interface

It ought to be

@Aspect
class A {
  @AfterReturning(pointcut="call(X.new(..))",returning="a")
  public void foo(X a) {System.out.println(a);}
}

However, if the joinpoint is for the call to aspect construction, then you may not be able to match it since aspect construction is mainly done in generated code that is not exposed to the weaver for matching.

Andy.

2008/7/29 Eric Bodden <eric.bodden@xxxxxxxxxxxxxx>
Try the following:

after() returning(X a): call(X.new(..)) {}

(sorry but I cannot do annotation-style syntax)

Eric

--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top