本文主要是介绍ProceedingJoinPoint proceed 函数,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
正常情况使用不带参的执行就行
Object proceed() throws Throwable;
带参数的就是若是在aop中参数值有替换的情况下需要将新的参数列表更新
Object proceed(Object[] var1) throws Throwable;
PS,org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint源码
public Object proceed() throws Throwable {return this.methodInvocation.invocableClone().proceed(); }public Object proceed(Object[] arguments) throws Throwable {Assert.notNull(arguments, "Argument array passed to proceed cannot be null");if (arguments.length != this.methodInvocation.getArguments().length) {throw new IllegalArgumentException("Expecting " + this.methodInvocation.getArguments().length + " arguments to proceed, but was passed " + arguments.length + " arguments");} else {this.methodInvocation.setArguments(arguments);return this.methodInvocation.invocableClone(arguments).proceed();} }
最近发现很多网上的资料不一定很准确,还是需要查看源码能准确知道函数的作用,
且简单的情况下查看源码比搜索引擎的文章更快捷
这篇关于ProceedingJoinPoint proceed 函数的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!