Hi. I think you can use "declare annotation" with a hasmethod-pointcut in order to declare an annotation on all types that have a method with @MyAnnotation. This annotation on the type can then be inherited.
(see here for hasmethod: http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg06671.html) Eric > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:aspectj-users- > [EMAIL PROTECTED] On Behalf Of Monal Daxini > Sent: Friday, September 29, 2006 4:33 PM > To: aspectj-users@eclipse.org > Subject: [aspectj-users] pointcut for overriden or implemented methods > > Hi, > > Is it possible to write a pointcut with the following requirements: > > Match all methods in classes that override or implement methods with > @MyAnnotation defined in the super class or the interface. So in the > following example the pointcut should match both methds in the > WorkPlace class. > > @Retention(RetentionPolicy.RUNTIME) > @Inherited > public @interface MyAnnotation { > } > > public interface Work { > @MyAnnotation > public void doSomething(); > } > > public abstract class AbstractPlace { > @MyAnnotation > public void getPlace(); > } > > public class WorkPlace extends AbstractPlace implements Work { > public void doSomething() { > ... > } > > public void getPlace() { > ... > } > } > > Note: the annotation on the method are not inherited. > > Thank you > Monal > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users