Take the 2-minute tour ×

I'm having some difficulties using AJDT. One of the things I would like to have it's a record of every method called on a given type, for instance, LinkedList. What I observed it's that using the pointcut below, I can just intersect method calls to any method called add to any instance that implements the Collection interface:

pointcut CollectionAddCallPointcut(): call(* java.util.Collection+.add(..));

As far as I can see, that excludes method calls made in external libraries, but those would be very usefull to me. How can I solve this?

share|improve this question
add comment

1 Answer

You have two options:

  1. Use load time weaving. This will weave all classes as they are loaded by the classloader. Only warning is that it is tricky to weave into jdk classes.
  2. Perform compile time weaving of all the libraries that you want to have your pointcut applied to.
share|improve this answer
add comment

Your Answer


