Getting the java.lang.reflect.Method from a ProceedingJoinPoint?

前端 未结 2 971
一向
一向 2021-01-31 07:31

The question is short and simple: Is there a way to get the Method object from an apsectj ProceedingJoinPoint?

Currently I am doing

Class[] parameterTy         


        
2条回答
  •  后悔当初
    2021-01-31 07:58

    Your method is not wrong, but there's a better one. You have to cast to MethodSignature

    MethodSignature signature = (MethodSignature) joinPoint.getSignature();
    Method method = signature.getMethod();
    

提交回复
热议问题