0
如何解決一個「無法找到符號變量thisJoinPoint」,而試圖在AndroidStudio中使用註釋樣式構建一個AspectJ項目?無法找到符號變量thisJoinPoint
平臺詳細信息:AspectJ的1.8.1,2.1.3 AndroidStudio
代碼示例:
import org.aspectj.lang.JoinPoint.*; // Not used!
import org.aspectj.lang.ProceedingJoinPoint; // Not used!
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class MyAspect {
@Pointcut("execution(* *(..))")
public void methodExecution() {}
@After("methodExecution()")
public void accessThisJoinPointData() {
if (thisJointPoint != null) { // HERE the variable isn’t recognized!
// Do something with thisJoinPoint...
}
}
}