org.springframework.aop.support

Class DelegatePerTargetObjectIntroductionInterceptor

    • Constructor Detail

      • DelegatePerTargetObjectIntroductionInterceptor

        public DelegatePerTargetObjectIntroductionInterceptor(java.lang.Class<?> defaultImplType,
                                                              java.lang.Class<?> interfaceType)
    • Method Detail

      • invoke

        @Nullable
        public java.lang.Object invoke(MethodInvocation mi)
                                          throws java.lang.Throwable
        Subclasses may need to override this if they want to perform custom behaviour in around advice. However, subclasses should invoke this method, which handles introduced interfaces and forwarding to the target.
        Specified by:
        invoke in interface MethodInterceptor
        Parameters:
        mi - the method invocation joinpoint
        Returns:
        the result of the call to Joinpoint.proceed(); might be intercepted by the interceptor
        Throws:
        java.lang.Throwable - if the interceptors or the target object throws an exception
      • doProceed

        protected java.lang.Object doProceed(MethodInvocation mi)
                                      throws java.lang.Throwable
        Proceed with the supplied MethodInterceptor. Subclasses can override this method to intercept method invocations on the target object which is useful when an introduction needs to monitor the object that it is introduced into. This method is never called for MethodInvocations on the introduced interfaces.
        Throws:
        java.lang.Throwable