1 2 3 4 5 6 7 8 9 10 11 12 13
import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @interface Foo {} aspect A { declare @method: void *.getName(): @Foo; public void Intface.getName() { } } interface Intface { } class C implements Intface {}