code: private void registerMethod(Class<?> type, Method method) {
      Class<?> returnType = method.getReturnType();
      if (returnType == void.class || returnType == Void.class) {
        registerVoidMethod(type, method);
      } else {
        registerValueMethod(type, method);
      }
    }
docs: Registers the given method for the given operation type.