Interface MethodInterceptor

    • Method Detail

      • invoke

        void invoke​(Invocation invocation)
             throws Throwable
        Implementation can perform before and after invocation logic.

        If a method interceptor wants to replace the result it does this via Invocation.result(Object). This is a little different to traditional method interceptors (i.e. org.org.aopalliance.intercept.MethodInterceptor). It is done this way to handle implied generic return types in the generated source code.

        Parameters:
        invocation - The invocation being intercepted
        Throws:
        Throwable - If the interception or underlying invocation throws an exception