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...
}
}
}