I seem to be having difficulty with this attempt to use after advice.
Basically, in one aspect, I am declaring a function on a
class....Actually, code might help this.

class HappyClass {
}

aspect HappyAspect {
 Foo HappyClass.foo = null;

 public void HappyClass.doFoo() {
   foo = new Foo();
 }
}

aspect OtherAspect {
 after(Foo f) : call(Foo.new()) && target(f) && within(HappyClass) {
   // Do something cool here
 }
 after(Foo f) : call(Foo.new()) && target(f) &&
withincode(HappyClass.doFoo()) {
   // Do something cool here
 }
 after(Foo f) : call(Foo.new()) && target(f) && within(HappyAspect) {
   // Do something cool here
 }
 after(Foo f) : call(Foo.new()) && target(f) {
   // Do something cool here
 }
}

Note that this does not apply, it says the advice did not match.  None
of the above advice applies.  Is there some trick I need to use to
aspect on function calls within injected methods?  Is this even
possible?  How would I do it if it is possible?

Thanks in advance,
Kendall
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to