code: public static ServerServiceDefinition overrideMethods(
        final ServerServiceDefinition service,
        final Map<MethodDescriptor, MethodDescriptor> marshallers) {
      List<ServerMethodDefinition<?, ?>> newMethods = new ArrayList<ServerMethodDefinition<?, ?>>();
      List<MethodDescriptor<?, ?>> newDescriptors = new ArrayList<MethodDescriptor<?, ?>>();
      // intercepts the descriptors
      for (final ServerMethodDefinition<?, ?> definition : service.getMethods()) {
        ServerMethodDefinition<?, ?> newMethod = interceptMethod(definition, marshallers);
        newDescriptors.add(newMethod.getMethodDescriptor());
        newMethods.add(newMethod);
      }
      // builds the new service descriptor
      final ServerServiceDefinition.Builder serviceBuilder = ServerServiceDefinition
          .builder(new ServiceDescriptor(service.getServiceDescriptor().getName(), newDescriptors));
      // creates the new service definition
      for (ServerMethodDefinition<?, ?> definition : newMethods) {
        serviceBuilder.addMethod(definition);
      }
      return serviceBuilder.build();
    }
docs: Creates a service definition that uses custom marshallers.
  
  @param service the service to intercept
  @param marshallers a map that specifies which marshaller to use for each method
  @return the new service definition