code: private JsonNode invokeCallbackMethod(final InvokeRequest req, final String cookie) {
          Object obj = this.getObject(req.getObjref());
          Method method = this.findCallbackMethod(obj.getClass(), cookie);
  
          final Class<?>[] argTypes = method.getParameterTypes();
          final Object[] args = new Object[argTypes.length];
          for (int i = 0; i < argTypes.length; i++) {
              args[i] = JsiiObjectMapper.treeToValue(req.getArgs().get(i), argTypes[i]);
          }
  
          return JsiiObjectMapper.valueToTree(invokeMethod(obj, method, args));
      }
docs: Invokes an override for a method.
  @param req The request
  @param cookie The cookie
  @return The method's return value