Interface MethodInterceptor

All Known Implementing Classes:
AopProxyBeanPostProcessor.FilteringMethodInterceptor, ExceptionInterceptor, TransactionInterceptor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MethodInterceptor
AOP method interceptor interface.

Implementations intercept method invocations and can add behavior before, after, or around the target method execution.

Similar to Spring's MethodInterceptor but simplified for UltiTools.

Since:
6.2.0
Author:
wisdomme
  • Method Summary

    Modifier and Type
    Method
    Description
    Intercept the given method invocation.
  • Method Details

    • invoke

      Object invoke(MethodInvocation invocation) throws Throwable
      Intercept the given method invocation.

      Implementations should call MethodInvocation.proceed() to continue the interceptor chain or invoke the target method.

      Parameters:
      invocation - the method invocation context
      Returns:
      the result of the method invocation
      Throws:
      Throwable - if the interceptor or target method throws an exception