public class PointcutsInGenericClasses { pointcut foo() : execution(* T.*(..)); } aspect X { declare warning : PointcutsInGenericClasses.foo() : "a match"; } class C { void bar() {} }