1 2 3 4 5 6 7 8 9 10 11
import java.lang.annotation.*; public aspect SampleAspect { declare parents : hasmethod(@Something * *.*(..)) implements SampleInterface; private interface SampleInterface{ } } @Retention(RetentionPolicy.RUNTIME) @interface Something {}