1

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?

4

1 回答 1

2

你有两个选择:

  1. 使用加载时间编织。这将编织所有类,因为它们由类加载器加载。唯一的警告是编织到 jdk 类中是很棘手的。
  2. 对要应用切入点的所有库执行编译时编织。
于 2013-01-09T04:33:47.957 回答