Source:
public void execute(InterceptorStack stack,ControllerMethod controllerMethod,Object currentController) { Object interceptor = container.instanceFor(interceptorClass); DefaultControllerInstance controllerInstance = new DefaultControllerInstance(currentController); InterceptorStackDecorator interceptorStackDecorator = new InterceptorStackDecorator(stack); InterceptorContainerDecorator interceptorContainer = new InterceptorContainerDecorator(container,interceptorStackDecorator,controllerMethod,controllerInstance,new DefaultSimplerInterceptorStack(interceptorStackDecorator, controllerMethod, controllerInstance)); Object returnObject = stepInvoker.tryToInvoke(interceptor,Accepts.class,parametersFor(Accepts.class,interceptor,interceptorContainer)); boolean accepts = true; if(returnObject!=null){ if(!returnObject.getClass().equals(Boolean.class)){ throw new IllegalStateException("@Accepts method should return boolean"); } accepts = (Boolean) returnObject; } if(accepts){ logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName()); stepInvoker.tryToInvoke(interceptor,BeforeCall.class); if(noAround(interceptor) && !interceptorStackDecorator.isNexted()){ stack.next(controllerMethod,controllerInstance.getController()); } else{ stepInvoker.tryToInvoke(interceptor,AroundCall.class,parametersFor(AroundCall.class,interceptor,interceptorContainer)); } stepInvoker.tryToInvoke(interceptor,AfterCall.class); } else { stack.next(controllerMethod, controllerInstance.getController()); } }

Target:
public void execute(InterceptorStack stack,ControllerMethod controllerMethod,Object currentController) { Object interceptor = container.instanceFor(interceptorClass); ControllerInstance controllerInstance = new DefaultControllerInstance(currentController); InterceptorStackDecorator interceptorStackDecorator = new InterceptorStackDecorator(stack); InterceptorContainerDecorator interceptorContainer = new InterceptorContainerDecorator(container,interceptorStackDecorator,controllerMethod,controllerInstance,new DefaultSimpleInterceptorStack(interceptorStackDecorator, controllerMethod, controllerInstance)); boolean accepts = new CustomAcceptsVerifier(controllerMethod,controllerInstance,container,interceptor).isValid(); Object returnObject = stepInvoker.tryToInvoke(interceptor,Accepts.class,new BeforeAfterSignatureAcceptor(),parametersFor(Accepts.class,interceptor,interceptorContainer)); if(returnObject!=null){ if(!returnObject.getClass().equals(Boolean.class)){ throw new IllegalStateException("@Accepts method should return boolean"); } accepts = (Boolean) returnObject; } if(accepts){ logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName()); stepInvoker.tryToInvoke(interceptor,BeforeCall.class,new BeforeAfterSignatureAcceptor()); if(noAround(interceptor) && !interceptorStackDecorator.isNexted()){ stack.next(controllerMethod,controllerInstance.getController()); } else{ stepInvoker.tryToInvoke(interceptor, AroundCall.class, new AroundSignatureAcceptor(), parametersFor(AroundCall.class,interceptor,interceptorContainer) ); } stepInvoker.tryToInvoke(interceptor,AfterCall.class,new BeforeAfterSignatureAcceptor()); } else { stack.next(controllerMethod, controllerInstance.getController()); } }