import java.util.*; public aspect WildcardArgsExamples { before(List aListOfSomeNumberType) : call(* foo(..)) && args(aListOfSomeNumberType) { System.out.println("advice match at " + thisJoinPointStaticPart); } before(List aListOfSomeNumberType) : (call(* goo*(List)) || call(* goo*(List))) && args(aListOfSomeNumberType) { System.out.println("advice match 2 at " + thisJoinPointStaticPart); } public static void main(String[] args) { C c = new C(); List ls = new ArrayList(); List ld = new ArrayList(); c.foo("hi"); c.foo(ls); c.foo(ld); List ln = new ArrayList(); c.goo1(ln); c.goo2(ld); c.goo3(ls); List lsn = ln; c.goo4(lsn); List l = new ArrayList(); c.goo5(l); c.goo6(new Object()); } } class C { public void foo(Object anObject) {} public void goo1(List ln) {} public void goo2(List ld) {} public void goo3(List ls) {} public void goo4(List lsn) {} public void goo5(List l) {} public void goo6(Object o) {} }