java.lang.Object
tech.guilhermekaua.spigotboot.core.context.component.proxy.ComponentProxy
All Implemented Interfaces:
MethodInterceptor

public class ComponentProxy extends Object implements MethodInterceptor
  • Constructor Details

    • ComponentProxy

      public ComponentProxy()
  • Method Details

    • createProxy

      public static <T> T createProxy(Class<T> clazz, @Nullable @Nullable Object realObject, Class<?>[] ctorArgs, Object[] ctorValues)
    • invoke

      public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable
      Specified by:
      invoke in interface MethodInterceptor
      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