Returns the method signature, e.g. `(options, [onComplete])`
@this {identifier}
@returns {string}
@category Returns string
@static
483524
function methodSig () {
  return arrayify(this.params).filter(function (param) {
    return param.name && !/\./.test(param.name)
  }).map(function (param) {
    if (param.variable) {
      return param.optional ? '[...' + param.name + ']' : '...' + param.name
    } else {
      return param.optional ? '[' + param.name + ']' : param.name
    }
  }).join(', ')
}
352372
private function getSignatureAlgorithm(array $complete_header, JWKInterface $key)
    {
        $this->log(LogLevel::DEBUG, 'Trying to find the algorithm used to sign');
        Assertion::keyExists($complete_header, 'alg', 'No "alg" parameter set in the header.');

        $this->log(LogLevel::DEBUG, 'The algorithm is {alg}', ['alg' => $complete_header['alg']]);

        Assertion::false(
            $key->has('alg') && $key->get('alg') !== $complete_header['alg'],
            sprintf('The algorithm "%s" is not allowed with this key.', $complete_header['alg'])
        );

        $signature_algorithm = $this->getJWAManager()->getAlgorithm($complete_header['alg']);
        Assertion::isInstanceOf($signature_algorithm, SignatureAlgorithmInterface::class, sprintf('The algorithm "%s" is not supported.', $complete_header['alg']));

        $this->log(LogLevel::DEBUG, 'The algorithm {alg} is supported', ['alg' => $complete_header['alg'], 'handler' => $signature_algorithm]);

        return $signature_algorithm;
    }
462749
function signature(obj, sig, classes) {
        if (typeof obj === 'string') {
            obj = list[obj];
        }
        var r;
        var id = obj.id;
        var type = obj.type;

        // oh, it's a constructor?
        if (obj.id.indexOf(".new") >= 0) {
            r = '<span class="constructorIdentifier">new </span>'; // if users want to hide or style this via CSS, they can
            r += '<span id="' + id + '" class="member-name ' + (classes || []).join(' ') + '">';
            r += obj.id.substring(0, obj.id.indexOf(".new")) + '</span>';
        }
        else if (type != "callback" && type != "event") { // method or property
            var className = obj.id.substring(0, obj.id.lastIndexOf("."));
            var memberName = obj.id.substring(obj.id.lastIndexOf(".") + 1);

            r = '<span id="' + id + '" class="member-name ' + (classes || []).join(' ') + '">'; // users can hide object name via CSS
            r += '<span class="sigClassName">' + className + '.</span><span class="sigMemberName">' + memberName + '</span></span>';
        }
        else if (type == "event") { // bah, an event !
            var parts = obj.id.split("@");

            var className = parts[0];
            var eventName = parts[1];

            r = '<span class="eventObjName">' + className + '</span><span class="eventListenerStart">.on("</span>';
            r += '<span id="' + id.replace("@", ".event.") + '" class="member-name eventMember ' + (classes || []).join(' ') + '">' + eventName + '</span>';
        }
        else {
            r = obj.id;
        }

        // for attributes
        if (obj.defaults !== undefined) {
          r += ' = ' + obj.defaults; 
        }
        else if (sig.arguments) {
            if (type != 'event') r += '(<span class="sigArgList">';
            else r += '<span class="eventListenerClose">", </span><span class="eventFunctionOpen">function(</span>';

            sig.arguments.forEach(function (sigArg, sigIdx, sigArgs) {
                var skip_first, a, value;
                // skip the first bound argument for prototype methods
                skip_first = obj.bound && obj.id.indexOf('#') >= 0;

                // turns the argument types into links
                if (obj.arguments && obj.arguments[sigIdx]) {
                    var argLink = "";

                    var currArg = obj.arguments[sigIdx];

                    if (currArg.name != sigArg.name) // in the event of, say, multiple signatures
                    {
                        var s;
                        for (s = 0; s < obj.arguments.length; s++) {
                            if (obj.arguments[s].name == sigArg.name) {
                                //console.log("swaped arg!");
                                currArg = obj.arguments[s];
                                break;
                            }
                        }
                        if (s == obj.arguments.length) {
                            //console.error("Couldn't find suitable argument replacement for " + currArg.name + " around " + obj.id);
                        }
                    }

                    currArg.types.forEach(function (currArgType, currIdx, currArgs) {
                        if (currArgType === "null") {
                          console.error("Error".red + ": could not determine the argument type for this argument!");
                          console.error(util.inspect(sigArgs));
                          console.error(util.inspect(currArgs));
                        }
                        
                        argLink += link(currArgType, 'argument ' + (classes || []).join(' '));

                        if (currIdx < currArgs.length - 1) argLink += " | ";
                    });
                    a = argLink + " " + sigArg.name;
                }
                else a = sigArg.name;

                // argument can be callback
                if (sigArg.arguments) {
                    a = signature({
                        id: a,
                        type: "callback"
                    }, sigArg);
                }
                if (!sigIdx && skip_first) {
                    return; //a = '@' + a;
                }
                if (typeof sigArg.default_value !== 'undefined') {
                    // apply custom stringifier
                    value = JSON.stringify(sigArg.default_value, function (k, v) {
                        if (v instanceof RegExp) {
                            // FIXME: get rid of quotes, if possible
                            v = v.source;
                        }
                        else if (v === 'null') {
                            v = null;
                        }
                        return v;
                    });
                    a = a + ' = ' + value;
                }
                // compensate for possibly skipped first argument
                if (sigIdx > (skip_first ? 1 : 0)) {
                    a = ', ' + a;
                }
                if (sigArg.ellipsis) {
                    a += '...';
                }
                if (sigArg.optional) {
                    a = '[' + a + ']';
                }
                r += a;
            });
            if (type != "event") r += '</span>)';
            else r += '<span class="eventFunctionClose">))</span>';
        }

        else if (type == "event" && !sig.arguments) r += '<span class="eventListenerClose">", </span><span class="eventFunctionOpen">function(</span><span class="eventFunctionClose">))</span>';
        else r += '<span class="emptyArgumentList">()</span>';

        return r;
    }
914364
@Override
    public String getMethodName()
    {
        // Generally, the method name is pretty static, but for internal
        // CMR methods (with index < 0) they are dynamic, and based on
        // the signature. For performance, the substring operation is
        // deferred until the method name is actually used.             d154342.10
        if (methodName == null && methodSignature != null)
            methodName = methodSignature.substring(0, methodSignature.indexOf(":"));

        return methodName;
    }
675195
public static String getCallerMethod()
  {
    StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
    if(stackTrace.length == 0) {
      return "unknown";
    }
    final StackTraceElement e = stackTrace[0];
    return Strings.concat(e.getClassName(), '#', e.getMethodName(), ':', e.getLineNumber());
  }
56803
public String getFullyQualifiedMethodName() {
        if (!visitingMethod) {
            throw new IllegalStateException("getFullyQualifiedMethodName called while not visiting method");
        }
        if (fullyQualifiedMethodName == null) {
            getMethodName();
            getDottedMethodSig();
            StringBuilder ref = new StringBuilder(5 + dottedClassName.length() + methodName.length() + dottedMethodSig.length());

            ref.append(dottedClassName).append(".").append(methodName).append(" : ").append(dottedMethodSig);
            fullyQualifiedMethodName = ref.toString();
        }
        return fullyQualifiedMethodName;
    }
622739
public function generateSignature()
    {
        if ($this->isFinal() === true && $this->isAbstract() === true) {
            throw new RuntimeException('A method can not be "abstract" and "final".');
        }

        if ($this->isAbstract() === true && $this->getVisibility() === Modifiers::VISIBILITY_PRIVATE) {
            throw new RuntimeException('A method can not be "abstract" and "private".');
        }

        $signature = $this->getIndentation();
        if ($this->isFinal() === true) {
            $signature .= 'final ';
        } elseif ($this->isAbstract()) {
            $signature .= 'abstract ';
        }

        $signature .= $this->getVisibility();

        if ($this->isStatic() === true) {
            $signature .= ' static';
        }

        return $signature . ' function ' . $this->name . '(' . implode(', ', $this->parameters) . ')';
    }
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();
    }
415273
function () {
		var str, i, len;

		// TODO void tags
		str = '' +
			'<' + this.descriptor.e;

		len = this.attributes.length;
		for ( i=0; i<len; i+=1 ) {
			str += ' ' + this.attributes[i].toString();
		}

		str += '>';

		if ( this.html ) {
			str += this.html;
		} else if ( this.fragment ) {
			str += this.fragment.toString();
		}

		str += '</' + this.descriptor.e + '>';

		return str;
	}
637894
function parseSignature (sig) {
  var tmp = /^(\w+)\((.*)\)$/.exec(sig)

  if (tmp.length !== 3) {
    throw new Error('Invalid method signature')
  }

  var args = /^(.+)\):\((.+)$/.exec(tmp[2])

  if (args !== null && args.length === 3) {
    return {
      method: tmp[1],
      args: args[1].split(','),
      retargs: args[2].split(',')
    }
  } else {
    var params = tmp[2].split(',')
    if (params.length === 1 && params[0] === '') {
      // Special-case (possibly naive) fixup for functions that take no arguments.
      // TODO: special cases are always bad, but this makes the function return
      // match what the calling functions expect
      params = []
    }
    return {
      method: tmp[1],
      args: params
    }
  }
}
943043
function () {
		var message = this.message;
		var name = this.name;
		var url = this.url;
		var result = name;
		if (message) {
			result +=  ': ' + message;
		}
		if (url) {
			result += ' (' + url + ')';
		}
		return result;
	}
756387
public String getReturnTypeSignature() {
        int endOfParams = signature.lastIndexOf(')');
        if (endOfParams < 0) {
            throw new IllegalArgumentException("Bad method signature: " + signature);
        }
        return signature.substring(endOfParams + 1);
    }
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;
        }
681772
def method_signature
      @parameters.map { |info| info.name == 'body' ? "body = {}" : Heroics.ruby_name(info.name) }.join(', ')
    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();
   }
1137526
public static String getCallerMethod() {
		StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
		if (stacktrace.length >= 4) {
			StackTraceElement element = stacktrace[3];
			return element.getClassName() + '.' + element.getMethodName() + "()";
		} else {
			return StringUtils.EMPTY;
		}
	}
1272021
public Content getSignature(MethodDoc method) {
        Content pre = new HtmlTree(HtmlTag.PRE);
        writer.addAnnotationInfo(method, pre);
        addModifiers(method, pre);
        addTypeParameters(method, pre);
        addReturnType(method, pre);
        if (configuration.linksource) {
            Content methodName = new StringContent(method.name());
            writer.addSrcLink(method, methodName, pre);
        } else {
            addName(method.name(), pre);
        }
        int indent = pre.charCount();
        addParameters(method, pre, indent);
        addExceptions(method, pre, indent);
        return pre;
    }