code: public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy)
          throws Throwable {
  
          if (method.getName().equals("toString") && args.length == 0) {
              return locator.toString();
          }
  
          if (Object.class.equals(method.getDeclaringClass())) {
              return proxy.invokeSuper(obj, args);
          }
  
          if (WrapsDriver.class.isAssignableFrom(method.getDeclaringClass()) && method.getName()
              .equals("getWrappedDriver")) {
              return driver;
          }
  
          WebElement realElement = locator.findElement();
          return getObject(realElement, method, args);
      }
docs: Look at {@link MethodInterceptor#intercept(Object, Method, Object[], MethodProxy)}.