Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] pointcut on annotated methods

Hi all,

I am not used to annotation mechanisms. So I would like to know why my annotated methods are not woven. here is my example :

import java.lang.annotation.*;

public @interface WritingMethod {}
pointcut writingMethodCalled(Object o):
       execution(@WritingMethod void *(*)) &&

void around(Object o): writingMethodCalled(o) {
       // this is not executed
   public void saveBean(Object obj) {
       System.out.println("Saved object: " + obj);

Thanks in advance,
Jonathan Clairembault

Back to the top