Interface MethodInterceptor

All Known Implementing Classes:
ComponentProxy, ConfigurationClassProxy
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
Intercepts method calls on a generated proxy instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    invoke(Object self, Method thisMethod, Method proceed, Object[] args)
     
  • Method Details

    • invoke

      Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable
      Parameters:
      self - the proxy instance receiving the call
      thisMethod - the method being invoked
      proceed - the generated pass-through method: invokes the superclass body for class targets (and equals/hashCode/toString of interface proxies), or the default-method body for interface default methods; null when the method is abstract and there is nothing to call
      args - invocation arguments (owned by the caller; do not retain)
      Returns:
      the value to return to the caller
      Throws:
      Throwable - propagated to the caller unchanged