Hi all

Let's assume that Java JRE would contain these two classes

package java.foo.moo;

class Foo1{
    public void method1(Foo2 obj){
        obj.method2();
    }
}

package java.foo.moo;
class Foo2{
    public void method2(Foo2 obj){
        System.out.println("capture this");
    }
}

How can I match to the method2 call (let's assume that method2 is only invoked from Foo1)
neither of this works:

pointcut foo1() : execution(public void java.foo.moo.Foo2.method2(Foo2));
pointcut foo2() : call(public void java.foo.moo.Foo2.method2(Foo2));

I assume the trick why it does not work is because neither the invocation point nor the declaration of the method is in the code defined by me.

Thanks Denes
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to