abstract aspect Base { declare warning : execution(S T.*(..)) : "base match"; } abstract aspect Middle extends Base { declare warning : execution(C X.*(..)) : "middle match"; } aspect Top extends Middle { declare warning : execution(C B.*(..)) : "top match"; } class C {} class B { C getC() { return null; } }