@function getValidSignature

validate method signature (e.g. 'ModuleName.methodName') and return
object with parsed out methodName, moduleName, and signature

@param {string} signature

@returns {object}

@throws on invalid signature
358537
function getValidSignature (signature) {
    // require string
    if (typeof signature !== 'string') {
        throw new Error('signature must be string')
    }
    // split signature into moduleName and methodName
    var parts = signature.split('.')
    // require two parts
    if (parts.length !== 2) {
        throw new Error('invalid signature '+signature)
    }
    // module name is first part
    var moduleName = parts[0]
    // method name is second part
    var methodName = parts[1]
    // require names to be valid
    requireValidName(moduleName)
    requireValidName(methodName)
    // return module and function name
    return {
        signature: signature,
        methodName: methodName,
        moduleName: moduleName,
    }
}
716258
def handle_signature(self, sig, signode):
        """"""
        if sig != 'Configuration':
            signode.clear()

            # Add "component" which is the type of this thing
            signode += addnodes.desc_annotation('component ', 'component ')

            if '.' in sig:
                modname, clsname = sig.rsplit('.', 1)
            else:
                modname, clsname = '', sig

            # If there's a module name, then we add the module
            if modname:
                signode += addnodes.desc_addname(modname + '.', modname + '.')

            # Add the class name
            signode += addnodes.desc_name(clsname, clsname)
        else:
            # Add just "Configuration"
            signode += addnodes.desc_name(sig, sig)

        return sig
602959
def system_methodSignature(self, method_name: str)->str:
        
        method = None
        if method_name in self.funcs:
            method = self.funcs[method_name]
        elif self.instance is not None:
            try:
                method = resolve_dotted_attribute(
                    self.instance,
                    method_name,
                    self.allow_dotted_names
                )
            except AttributeError:
                pass
        if method is None:
            return ""
        else:
            return str(inspect.signature(method))
966376
function makeSignature(params) {
	if (!params) return "()";
	var signature = "("
	+
	params.filter(
		function($) {
			return $.name.indexOf(".") == -1; // don't show config params in signature
		}
	).map(
		function($) {
			return $.name;
		}
	).join(", ")
	+
	")";
	return signature;
}
248
public static void checkFieldSignature(final String signature) {
        int pos = checkFieldTypeSignature(signature, 0);
        if (pos != signature.length()) {
            throw new IllegalArgumentException(signature + ": error at index "
                    + pos);
        }
    }
847132
function getQualifiedJSXName(object) {
  if (object.type === "JSXIdentifier") {
    return object.name;
  }

  if (object.type === "JSXNamespacedName") {
    return object.namespace.name + ":" + object.name.name;
  }

  if (object.type === "JSXMemberExpression") {
    return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  }
}
494260
function (message, signature) {
      var md = forge.md.sha1.create();
      md.update(message, 'utf8');
      try {
        return this._cert.publicKey.verify(md.digest().bytes(), forge.util.decode64(signature));
      } catch (e) {
        return false;
      }
    }
980002
private static String getSignature(MethodLiteral<?, ?> method, String[] paramNames,
      String overrideName, int overrideModifiers) throws NoSourceNameException {
    if (paramNames.length != method.getParameterTypes().size()) {
      throw new IllegalArgumentException(
          String.format("Wrong number of parameters provided for method signature, "
              + "expected %d but got %d.", method.getParameterTypes().size(), paramNames.length));
    }

    StringBuilder sb = new StringBuilder();

    if (overrideModifiers != 0) {
      sb.append(Modifier.toString(overrideModifiers)).append(" ");
    }

    if (method.getTypeParameters().length > 0) {
      List<String> typeParameters = new ArrayList<String>();
      for (TypeVariable<?> typeVariable : method.getTypeParameters()) {
        typeParameters.add(getTypeVariableDefinition(typeVariable));
      }
      sb.append("<").append(join(", ", typeParameters)).append("> ");
    }

    if (!method.isConstructor()) {
      sb.append(getSourceName(method.getReturnType())).append(" ");
      if (overrideName != null) {
        sb.append(overrideName);
      } else {
        sb.append(method.getName());
      }
    } else {
      sb.append(getSourceName(method.getRawDeclaringType()));
    }
    sb.append("(");

    // TODO(schmitt): We are not respecting varargs here.
    List<String> parameters = new ArrayList<String>();
    int i = 0;
    for (TypeLiteral<?> parameterType : method.getParameterTypes()) {
      parameters.add(
          String.format("%s %s", getSourceName(parameterType), paramNames[i]));
      i++;
    }
    sb.append(join(", ", parameters)).append(")");

    if (method.getExceptionTypes().size() > 0) {
      List<String> exceptions = new ArrayList<String>();
      for (TypeLiteral<?> exceptionType : method.getExceptionTypes()) {
        exceptions.add(getSourceName(exceptionType));
      }
      sb.append(" throws ").append(join(", ", exceptions));
    }

    return sb.toString();
  }
669868
function doBindForMethod (signature) {
    // validate signature
    signature = getValidSignature(signature)
    // if method is not defined do nothing
    if (!hasMethod(signature.signature)) {
        return
    }
    // get method and module
    var method = getMethod(signature.signature)
    var module = getModule(signature.moduleName)
    // skip if no binds for module
    if (!defined(immutable.binds[signature.moduleName])) {
        return
    }
    // skip if no binds for method
    if (!defined(immutable.binds[signature.moduleName][signature.methodName])) {
        return
    }
    // get all binds for method indexed by bind method
    var bindTypeBinds = immutable.binds[signature.moduleName][signature.methodName]
    // iterate over each bind method
    _.each(bindTypeBinds, (boundMethods, bindType) => {
        // iterate over each bind
        _.each(boundMethods, boundMethod => {
            // do nothing if already bound
            if (boundMethod.bound) {
                return
            }
            // bind method
            module.bind(bindType, signature.methodName, boundMethod.method)
            // set bound flag
            boundMethod.bound = true
        })
    })
}
418804
function doCacheForMethod (signature) {
    // validate signature
    signature = getValidSignature(signature)
    // if method is not defined do nothing
    if (!hasMethod(signature.signature)) {
        return
    }
    // get method and module
    var method = getMethod(signature.signature)
    var module = getModule(signature.moduleName)
    // skip if no caches for module
    if (!defined(immutable.caches[signature.moduleName])) {
        return
    }
    // skip if no caches for method
    if (!defined(immutable.caches[signature.moduleName][signature.methodName])) {
        return
    }
    // get cache entry
    var cache = immutable.caches[signature.moduleName][signature.methodName]
    // set cache rule on method
    module.cache(signature.methodName, cache.cache)
    // set cached flag true now that cache rule added
    cache.cached = true
}
600872
public final String getSignature() {
        final StringBuffer sb = new StringBuffer();
        if (getModifiers().length() > 0) {
            sb.append(getModifiers());
            sb.append(" ");
        }
        sb.append(returnType.getName());
        sb.append(" ");
        sb.append(getName());
        sb.append("(");
        for (int i = 0; i < getArguments().size(); i++) {
            if (i > 0) {
                sb.append(", ");
            }
            sb.append(getArguments().get(i));
        }
        sb.append(")");
        if (getExceptions().size() > 0) {
            sb.append(" throws ");
            for (int i = 0; i < getExceptions().size(); i++) {
                if (i > 0) {
                    sb.append(",");
                }
                sb.append(getExceptions().get(i).getName());
            }
        }
        return sb.toString();
    }
1352988
function InvalidSignature(reason) {
  Error.captureStackTrace(this, this.constructor);
  this.type = 'unauthorized';
  this.statusCode = 401;
  this.message = 'Invalid request signature';
  this.reason = reason;
}
582869
public static String convertMethodSignature(JavaClass javaClass, Method method) {
        return convertMethodSignature(javaClass.getClassName(), method.getName(), method.getSignature());
    }
1074757
protected static String getMethodSignature(Method method) {
    return getMethodSignature(method.getName(), method.getParameterTypes(), method.getReturnType());
  }
1221478
function objectToSignature(source) {
  function sortObject(input) {
      if(typeof input !== 'object' ||input===null)
          return input
      var output = {};
       Object.keys(input).sort().forEach(function (key) {
        output[key] = sortObject(input[key]);
      });
      return output;
  }
  var signature={};
  //
  // what about transactions and transfers ??
  // FIXME append 'amount_negative',
  ['balance','card','id','wid','email','apikey'].forEach(function (key) {
    signature[key]=source[key];
  });

  return sortObject(signature);
}
1316843
public static String transformMethodSignature(String signature) {
        StringBuilder buf = new StringBuilder();

        buf.append('(');

        SignatureParser parser = new SignatureParser(signature);
        for (Iterator<String> i = parser.parameterSignatureIterator(); i.hasNext();) {
            String param = i.next();
            param = transformSignature(param);
            buf.append(param);
        }

        buf.append(')');

        return buf.toString();
    }
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();
   }