code: protected static Response.ResponseBuilder generateRespBuilder(
              ContainerRequestContext containerRequestContext,
              ExtendedUriInfo extendedUriInfo,
              MediaType mediaType,
              Iterable<OptionsResponseGenerator> respEntityGenerators) {
  
          final Set<String> allowedMethods = ModelProcessorUtil.getAllowedMethods(
                  (extendedUriInfo.getMatchedRuntimeResources().get(0)));
  
          Response.ResponseBuilder builder = Response.ok().allow(allowedMethods);
          if (allowedMethods.contains(HttpPatchProperties.METHOD_NAME)) {
              builder.header(HttpPatchProperties.ACCEPT_PATCH_HEADER, getSupportPatchMediaTypes());
          }
          if (mediaType != null) {
              builder.type(mediaType);
          }
          if (respEntityGenerators != null) {
              Response response = builder.build();
              for (OptionsResponseGenerator generator : respEntityGenerators) {
                  response = generator.generate(allowedMethods, mediaType, extendedUriInfo,
                          containerRequestContext, response);
              }
              builder = Response.fromResponse(response);
          }
          return builder;
      }
docs: <p>generateRespBuilder.</p>
  
  @param containerRequestContext a {@link javax.ws.rs.container.ContainerRequestContext} object.
  @param extendedUriInfo         a {@link org.glassfish.jersey.server.ExtendedUriInfo} object.
  @param mediaType               a {@link javax.ws.rs.core.MediaType} object.
  @param respEntityGenerators    a {@link java.lang.Iterable} object.
  @return a {@link javax.ws.rs.core.Response.ResponseBuilder} object.