Class ProxyUtils.Handler

java.lang.Object
com.bobocode.bring.core.utils.ProxyUtils.Handler
All Implemented Interfaces:
javassist.util.proxy.MethodHandler
Enclosing class:
ProxyUtils

public class ProxyUtils.Handler extends Object implements javassist.util.proxy.MethodHandler
Handler class implementing MethodHandler for proxy invocation.
  • Field Details

    • constructor

      private final Constructor<?> constructor
    • constructorArgs

      private final Object[] constructorArgs
  • Constructor Details

    • Handler

      public Handler()
  • Method Details

    • invoke

      public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable
      Invokes the method on the proxy object and delegates to the actual object.
      Specified by:
      invoke in interface javassist.util.proxy.MethodHandler
      Parameters:
      self - The proxy object
      thisMethod - The method being invoked on the proxy
      proceed - The proceed method
      args - The arguments for the method invocation
      Returns:
      The result of the method invocation on the actual object
      Throws:
      Throwable - If an error occurs during method invocation