Skip to main content

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

You can use binary weaving to weave into third-party jars. Take a look at the -inpath option to ajc.

-Ramnivas

On Wed, Aug 5, 2009 at 3:18 PM, <Dan.Lipofsky@xxxxxxxxxxxxxx> wrote:
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
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top