2013-08-01 29 views
0

我有一个要求是从切入点实现中获取截获的方法的参数值,如下所示。在Pointcut实现中获取方法参数实例

截获方法:

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

和看点实施

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

是否有可能获得afterThrowing法 “mapValues” 参数的实例。 有人可以请一些光。

+2

[JoinPoint.getArgs](http://www.eclipse.org/aspectj/

JoinPoint.getArgs() 

在评论DOC /发行/运行时API /组织/ AspectJ的/郎/ JoinPoint.html#getArgs())。 –

回答