0
주석 스타일을 사용하여 AndroidStudio에서 AspectJ 프로젝트를 빌드하는 중 "이 기호 변수를 찾을 수 없습니다."라는 문제를 해결하는 방법은 무엇입니까?기호 변수 thisJoinPoint를 찾을 수 없습니다.
플랫폼 세부 정보 : AspectJ를 1.8.1, 안드로이드 스튜디오 2.1.3
코드 예제 : 난 그냥 주석 스타일, 우리가 thisJoinPoint를 선언 할 필요가 발견 된 일부 테스트 및 연구 후
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...
}
}
}