Properly find the appropriate call signature for the GRPC::GenericService given the request method name

 @return [Symbol]
513425
def call_signature(request_method)
      desc = rpc_desc(request_method)
      desc&.name ? desc.name.to_s.underscore.to_sym : nil
    end
107192
private String createMethodSignature(Method method)
   {
      StringBuilder sb = new StringBuilder();
      sb.append("(");
      for (Class<?> type : method.getParameterTypes())
      {
         sb.append(getTypeString(type));
      }
      sb.append(")");
      Class<?> type = method.getReturnType();
      if (type.getName().equals("void"))
      {
         sb.append("V");
      }
      else
      {
         sb.append(getTypeString(type));
      }
      return sb.toString();
   }
407881
private static String getMethodSignature(ExecutableElement executableElement) throws IOException
    {
        Result sb = new Result();
        formalTypeParameters(sb, executableElement.getTypeParameters());
        sb.append('(');
        for (VariableElement param : executableElement.getParameters())
        {
            typeSignature(sb, param.asType());
        }
        sb.append(')');
        // ReturnType:
        //    TypeSignature
        //    VoidDescriptor
        TypeMirror returnType = executableElement.getReturnType();
        if (TypeKind.VOID.equals(returnType.getKind()))
        {
            sb.append('V');
        }
        else
        {
            typeSignature(sb, returnType);
        }

        for (TypeMirror param : executableElement.getThrownTypes())
        {
            getThrowsSignature(sb, param);
        }
        return sb.toString();
    }
673827
function(typePrefix, name) {
            var vcapServices = (typeof process.env.VCAP_SERVICES === 'string' ?
                                JSON.parse(process.env.VCAP_SERVICES) : {});
            var matchType = new RegExp('^' + typePrefix);
            for (var type in vcapServices) {
                if (matchType.test(type)) {
                    var svcDef = vcapServices[type];
                    if (Array.isArray(svcDef)) {
                        if (name) {
                            for (var svc in svcDef) {
                                var val = svcDef[svc];
                                if ((typeof val === 'object') &&
                                    (val.name === name)) {
                                    return val.credentials;
                                }
                            }
                        } else {
                            var service = svcDef[0];
                            if (typeof service === 'object') {
                                return service.credentials;
                            }
                        }
                    }
                }
            }
            return undefined;
        }
1197151
function getSingleCallSignature(type) {
            if (type.flags & 2588672 /* ObjectType */) {
                var resolved = resolveStructuredTypeMembers(type);
                if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 &&
                    resolved.properties.length === 0 && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
                    return resolved.callSignatures[0];
                }
            }
            return undefined;
        }
325360
function getCanonicalRequest(method, path, headers, signedHeaders, hashedPayload) {
  if (!isString(method)) {
    throw new TypeError('method should be of type "string"')
  }
  if (!isString(path)) {
    throw new TypeError('path should be of type "string"')
  }
  if (!isObject(headers)) {
    throw new TypeError('headers should be of type "object"')
  }
  if (!isArray(signedHeaders)) {
    throw new TypeError('signedHeaders should be of type "array"')
  }
  if (!isString(hashedPayload)) {
    throw new TypeError('hashedPayload should be of type "string"')
  }
  var headersArray = signedHeaders.reduce((acc, i) => {
    acc.push(`${i.toLowerCase()}:${headers[i]}`)
    return acc
  }, [])

  var requestResource = path.split('?')[0]
  var requestQuery = path.split('?')[1]
  if (!requestQuery) requestQuery = ''

  if (requestQuery) {
    requestQuery = requestQuery
      .split('&')
      .sort()
      .map(element => element.indexOf('=') === -1 ? element + '=' : element)
      .join('&')
  }

  var canonical = []
  canonical.push(method.toUpperCase())
  canonical.push(requestResource)
  canonical.push(requestQuery)
  canonical.push(headersArray.join('\n') + '\n')
  canonical.push(signedHeaders.join(';').toLowerCase())
  canonical.push(hashedPayload)
  return canonical.join('\n')
}
429135
def signature(cls):
    
    snake_scope = cls.options_scope.replace('-', '_')
    partial_construct_optionable = functools.partial(_construct_optionable, cls)
    partial_construct_optionable.__name__ = 'construct_scope_{}'.format(snake_scope)
    return dict(
        output_type=cls.optionable_cls,
        input_selectors=tuple(),
        func=partial_construct_optionable,
        input_gets=(Get.create_statically_for_rule_graph(ScopedOptions, Scope),),
        dependency_optionables=(cls.optionable_cls,),
      )
405191
def get_params_initialization_code(method)
      code = to_param_names_array(method.params).map { |p| "      #{p} = double('#{p}')" }.join("\n")
      code.empty? ? '' : "#{code}\n"
    end
1216523
public String getMethodSignature() {
        if (method != null) {
            String methodSignature = method.toString();
            return methodSignature.replaceFirst("public void ", "");
        }
        return null;
    }
1227311
private function checkRequestConsistence(RpcMethod $registered_method, array $parameters) {

        $signatures = $registered_method->getSignatures(false);

        foreach ( $signatures as $num => $signature ) {

            if ( self::checkSignatureMatch($parameters, $signature["PARAMETERS"]) === true ) return $num;

        }

        throw new RpcException("Invalid params", -32602);

    }
1100648
def rpc(self, request, args):
        
        if request.method != 'POST':
            return self.error(405, request)
        payload = request.get_data(as_text=True) or '{}'
        request_method = request.args.get('method')
        if not request_method:
            return self.error(
                400, request,
                message="A query string parameter method= is missing."
            )
        name_map = self.service.__nirum_method_names__
        try:
            method_facial_name = name_map.behind_names[request_method]
        except KeyError:
            return self.error(
                400,
                request,
                message="Service doesn't have procedure named '{}'.".format(
                    request_method
                )
            )
        try:
            service_method = getattr(self.service, method_facial_name)
        except AttributeError:
            return self.error(
                400,
                request,
                message="Service has no procedure '{}'.".format(
                    request_method
                )
            )
        if not callable(service_method):
            return self.error(
                400, request,
                message="Remote procedure '{}' is not callable.".format(
                    request_method
                )
            )
        try:
            request_json = json.loads(payload)
        except ValueError:
            return self.error(
                400,
                request,
                message="Invalid JSON payload: '{}'.".format(payload)
            )
        type_hints = self.service.__nirum_service_methods__[method_facial_name]
        try:
            arguments = self._parse_procedure_arguments(
                type_hints,
                request_json
            )
        except (NirumProcedureArgumentValueError,
                NirumProcedureArgumentRequiredError) as e:
            return self.error(400, request, message=str(e))
        method_error_types = self.service.__nirum_method_error_types__
        if not callable(method_error_types):  # generated by older compiler
            method_error_types = method_error_types.get
        method_error = method_error_types(method_facial_name, ())
        try:
            result = service_method(**arguments)
        except method_error as e:
            return self._raw_response(400, serialize_meta(e))
        return_type = type_hints['_return']
        if type_hints.get('_v', 1) >= 2:
            return_type = return_type()
        if not self._check_return_type(return_type, result):
            return self.error(
                400,
                request,
                message="Incorrect return type '{0}' "
                        "for '{1}'. expected '{2}'.".format(
                            typing._type_repr(result.__class__),
                            request_method,
                            typing._type_repr(return_type)
                        )
            )
        else:
            return self._raw_response(200, serialize_meta(result))
631890
function Service(name, messages, types, ptcl, server) {
  if (typeof name != 'string') {
    // Let's be helpful in case this class is instantiated directly.
    return Service.forProtocol(name, messages);
  }

  this.name = name;
  this._messagesByName = messages || {};
  this.messages = Object.freeze(utils.objectValues(this._messagesByName));

  this._typesByName = types || {};
  this.types = Object.freeze(utils.objectValues(this._typesByName));

  this.protocol = ptcl;
  // We cache a string rather than a buffer to not retain an entire slab.
  this._hashStr = utils.getHash(JSON.stringify(ptcl)).toString('binary');
  this.doc = ptcl.doc ? '' + ptcl.doc : undefined;

  // We add a server to each protocol for backwards-compatibility (to allow the
  // use of `protocol.on`). This covers all cases except the use of the
  // `strictErrors` option, which requires moving to the new API.
  this._server = server || this.createServer({silent: true});
  Object.freeze(this);
}
232275
def compute_signature params
      if $DEBUG
        puts "keys before sorted: #{params.keys}"
      end

      sorted_keys = params.keys.sort

      if $DEBUG
        puts "keys after sorted: #{sorted_keys}"
      end

      canonicalized_query_string = ""

      canonicalized_query_string = sorted_keys.map {|key|
        "%s=%s" % [safe_encode(key.to_s), safe_encode(params[key])]
      }.join(self.service.separator)

      length = canonicalized_query_string.length

      string_to_sign = self.service.http_method + self.service.separator + safe_encode('/') + self.service.separator + safe_encode(canonicalized_query_string)

      if $DEBUG
        puts "string_to_sign is #{string_to_sign}"
      end

      signature = calculate_signature access_key_secret+"&", string_to_sign
    end
414644
private String getMethod(ELNode.Function func) throws JspTranslationException {
        FunctionInfo funcInfo = func.getFunctionInfo();
        String signature = funcInfo.getFunctionSignature();

        int start = signature.indexOf(' ');
        if (start < 0) {
            throw new JspTranslationException("jsp.error.tld.fn.invalid.signature " + func.getPrefix()+" "+ func.getName());					
        }
        int end = signature.indexOf('(');
        if (end < 0) {
            throw new JspTranslationException("jsp.error.tld.fn.invalid.signature.parenexpected " + func.getPrefix()+" "+ func.getName());					
        }
        return signature.substring(start + 1, end).trim();
    }
674902
def generic_http_header_parser_for(header_name):
    

    def parser():
        request_id = request.headers.get(header_name, '').strip()

        if not request_id:
            # If the request id is empty return None
            return None
        return request_id
    return parser
493375
def blocking_service_impl
      interface = service_class.java_proto_class::BlockingInterface
      service_method_names = service_class.service_method_names

      clazz = Class.new(Object) do
        include interface

        def initialize(processor)
          @processor = processor
        end

        service_method_names.each do |service_method_name|
          class_eval <<-EOF, __FILE__, __LINE__+1
            def #{service_method_name}(controller, request)
              response = @processor._#{service_method_name}(!request.nil? ? JProtobuf.jprotobuf_message(request) : nil)
              !response.nil? ? response.java_proto : nil
            end
          EOF
        end
      end

      service_class.java_proto_class.new_reflective_blocking_service(clazz.new(self))
    end
1176151
def queue_name_for_method(method_name)
      return queue_names[method_name] if queue_names[method_name]

      queue_name = generate_queue_name(method_name)
      queue_for(method_name, queue_name)
      return queue_name
    end