[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] pointcut to get outer class object

I have the following class:

package Test;
public class A
{
    private B b = new B()
    {
       @Override
       public boolean someFunc() {return false;}
    }
 }
What is the AspectJ pointcut to capture execution of someFunc, and at
the same time get a reference to outer class A?

I tried:

pointcut captureExec(): within(Test.A) && execution(boolean Test.B+.someFunc());
before(): captureExec()
{
    //here thisJoinPount.getTarget() returns object to class B,
    //but I need reference object to the outer class A
}

Thanks