我有以下课程:
package Test;
public class A
{
private B b = new B()
{
@Override
public boolean someFunc() {return false;}
}
}
什么是 AspectJ 切入点来捕获 someFunc 的执行,同时获得对外部类 A 的引用?
我试过了:
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
}
谢谢