Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] adding advice to 3rd party code

Is there a way I can put advice on code that is not
mine (3rd party code already compiled in a JAR)?
Use case: method a() calls b() which calls c() which calls d().
a() is my code while b, c, and d are not.


something like this:
    @AfterReturning(pointcut = "call(* com.foo.Bar.*(..))")
    public void logCall(JoinPoint thisJoinPoint) {
        log.info(thisJoinPoint);
    }

works for b() but not d().  There are many paths to d(),
so I really want to capture it at that level.

I am using annotations and compiling with
Eclipse 3.3 and Java 1.6.
- Dan


Back to the top