[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Pointcut definition with annotations
|
hello
i have a set of interfaces, and some of their methods are annotated via
a custom annotation, called, ManagedResourceAnnotation, something like
the following:
public interface Foo{
@ManagedResourceAnnotation
void push (String s);
}
Now, i'd like to define a pointcut to capture a call to any method with
that annotation.
i tried with:
*pointcut annotatedResourceInvocation(): call(* *(..)) && @target
(ManagedResourceAnnotation);
*before annotatedResourceInvocation() {
//do some stuff
}
but this doesn't look to be the way, getting this (in ajdt eclipse plugin):
"advice definied in MyAspect has not been applied [Xlint: adviceDidNotMatch]
I'm using ajdt build 20050715120753
Did i misunderstood what it is explained in the aj5.0 dev book (the
example i followed is taken from:
http://www.eclipse.org/aspectj/doc/next/adk15notebook/annotations-pointcuts-and-advice.html#d0e1194
/call(* *(..)) && @target(Classified)/
/ Matches a call to any object where the target of the call has a
@Classified annotation./
Thanks,
Valerio