// "public annotated method on an Interface" import java.lang.annotation.*; import java.lang.reflect.Method; @Retention(RetentionPolicy.RUNTIME) @interface anInterface{} interface A09{ @anInterface public void a(); } aspect B09 { public static void main(String [] args){ Class c = A09.class; try { Method m = c.getDeclaredMethod("a", new Class [0]); Annotation [] anns = m.getDeclaredAnnotations(); for (int i = 0;i < anns.length;i++){ System.out.println(anns[i]); } } catch (Exception e){ System.out.println("exceptional!"); } } }