0

I have one requirement to get the intercepted method's parameter value from pointcut implementation as follows.

Intercepted method :

public void execute(Object mapValues)throws Throwable{
....
}

and in Aspect Implementation

@AfterThrowing(pointcut = "execution(*com.AdhocJob.execute(..))", throwing="ex")
        public void afterThrowing(JoinPoint pjp,Throwable ex) {
           MethodSignature signature = (MethodSignature) pjp.getSignature();
....
}

Is it possible to get the instance of "mapValues" parameter in afterThrowing method. Could someone please put some light on it.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
abhijit nag
  • 451
  • 6
  • 24

1 Answers1

0

You can use the getArgs() method from the JoinPoint argument:

JoinPoint.getArgs()

as in comment by Boris the spider

tkruse
  • 10,222
  • 7
  • 53
  • 80