@FunctionalInterface public interface MethodWriterInterceptorReturns
The interceptor provides a means to manipulate or monitor the invocation of methods. It allows for actions to be taken before or after a method invocation, or to bypass the method invocation entirely.
This can be particularly useful for scenarios such as logging method invocations, modifying method parameters, changing return values, or implementing pre- and post-method invocation actions.
| Modifier and Type | Method and Description |
|---|---|
Object |
intercept(Method method,
Object[] args,
BiFunction<Method,Object[],Object> invoker)
Intercepts a method invocation.
|
Object intercept(Method method, Object[] args, BiFunction<Method,Object[],Object> invoker)
method - the method that is being invokedargs - the arguments used for the method callinvoker - a functional interface representing the invocation of the methodCopyright © 2023. All rights reserved.