import java.util.*; public aspect CodeOne { before(): execution(* CodeOne.*(..)) && args(List) {} before(): execution(* CodeOne.*(..)) && args(List) {} void m(List li) {} public void callm() { List ln = new ArrayList(); List li = new ArrayList(); // m(ln);//not allowed m(li); } }