import java.lang.annotation.*; import java.io.*; aspect MyAspect { before(): execution(* read(..)) { } } class MyClass implements MyInterface { public static void main(String[] arg) { } public void read(E e) throws IOException { } public void exceptionDetected(E e) { } } interface MyInterface { public void read(T t) throws IOException; }