[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Annotations to pieces of advice
|
Hi all.
I am having a problem with the following piece of advice:
@name("foo")
after(Object o): execution(* foo()) && target(o) {
System.err.println("foo");
}
As you can see, it is annotated, and I am looking for a way to
"discover" the annotation "foo" for this piece of advice at runtime.
However, when I inspect the annotations for the advice method that ajc
produces for this piece of advice, then instead I only get the
following annotation:
@org.aspectj.lang.annotation.After(argNames=o, value=(execution(*
foo()) && target(o)))
I assume that ajc adds this annotation as an artifact of the weaving
process, which is nice, but it also seems as ajc does not preserver
the additional annotation that I added to the advice. Is this a bug?
Or how else am I supposed to find out at runtime whether or not an
advice carries an annotation?
Cheers,
Eric
--
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada