[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
|
Hello Alex
thanks for your explanations.
Following this link:
http://eclipse.org/aspectj/doc/next/adk15notebook/annotations-pointcuts-and-advice.html#d0e1194
i understood that the @target is the pcd designator i need.
The example pointcut in the doc:
call(* *(..)) && @target(Classified)
seems to be what i need, with these modifications:
call(* AnnotatedService+.*(..)) && @target(MemberOfMonitoredSet);
If so it is, still my advice is not being executed.
AJDT tooltip reports that this advice advises the method-call void
test.AnnotatedService.print(String) (runtime test)
One more doubt i have is what is the difference between the above
pointcut and the following one:
call(* AnnotatedService+.*(..)) && target(@MemberOfMonitoredSet *);
I suppose the first one can perform a checking at runtime, while the
second can only check against static types of target objects.
Sincerly, i don't understand what is going on here..
This is the output i get when launching my test:
http://veleno.pastebin.com/334503
As you can see, the string that should be printed by this advice:
http://veleno.pastebin.com/334504
is not printed.
Any idea ?
Alexandre Vasseur ha scritto:
call(* Service+.print(..)) && @annotation(MemberOfMonitoredSet);
In your case the annotation is a class level one on the interface
implemented by the declaring type.
- References:
- [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration
- Re: [aspectj-users] LTW, javaagent, JUnit and ANT integration