import java.util.*; public aspect SimpleParameterizedTypeExamples { declare warning : get(List Foo.myStrings) : "get myStrings 1"; declare warning : get(List Foo.myStrings) : "get myStrings 2"; declare warning : get(List *) : "get myStrings 3 - no match"; declare warning : get(List Foo.myFloats) : "get myFloats 1"; declare warning : get(List *) : "get myFloats 2"; declare warning : get(List *) : "get myFloats 3"; declare warning : get(List *) : "get myFloats 4 - no match"; declare warning : execution(List get*(..)) : "getter 1"; declare warning : execution(List<*> get*(..)) : "getter 2"; declare warning : execution(List get*(..)) : "getter 3"; declare warning : execution(List get*(..)) : "getter 4"; declare warning : call(* addStrings(List)) : "call 1"; declare warning : call(* addStrings(List)) : "call 2"; declare warning : call(* addStrings(List)) : "call 3 - no match"; void bar() { Foo f = new Foo(); f.addStrings(null); } } class Foo { List myStrings; List myFloats; public List getStrings() { return myStrings; } public List getFloats() { return myFloats; } public void addStrings(List evenMoreStrings) { myStrings.addAll(evenMoreStrings); } }