My guess is that since List is an interface and you want to combine calls with all expandable classes, you will need to use this syntax:
pointcut callsToList() : call(* List+.*(..));
Update: OK, I got it to work with this version:
pointcut callsToList(List list) : call(* java.util.List+.*(..)) && target(list); Object around(List l) : callsToList(l) {
This also works:
before(List l) : callsToList(l) {
Sean Patrick Floyd
source share