Returns this in Java method signature syntax.

@param name method name
@param varargs request that the last argument, if it is an array, to
be formatted in varargs syntax.
438715
public String toMethodSignature(String name, boolean varargs) {
        StringBuffer buf = new StringBuffer();
        buf.append(mRetType.getFullName());
        buf.append(' ');
        buf.append(name);
        buf.append('(');

        TypeDesc[] params = mParams;
        for (int i=0; i<params.length; i++) {
            if (i > 0) {
                buf.append(", ");
            }
            TypeDesc param = params[i];
            if (varargs && param.isArray() && i == (params.length - 1)) {
                buf.append(param.getComponentType().getFullName());
                buf.append("...");
            } else {
                buf.append(param.getFullName());
            }
        }

        return buf.append(')').toString();
    }
1292223
public Signature insertArgs(int index, String[] names, Class<?>... types) {
        assert names.length == types.length : "names and types must be of the same length";

        String[] newArgNames = new String[argNames.length + names.length];
        System.arraycopy(names, 0, newArgNames, index, names.length);
        if (index != 0) System.arraycopy(argNames, 0, newArgNames, 0, index);
        if (argNames.length - index != 0)
            System.arraycopy(argNames, index, newArgNames, index + names.length, argNames.length - index);

        MethodType newMethodType = methodType.insertParameterTypes(index, types);

        return new Signature(newMethodType, newArgNames);
    }
694315
public static String getParam(String name) {
		String param = getServletRequest().getParameter(name);
		if(null == param){
			MultipartFormData multipart = getMultipart();
			if(null != multipart){
				param = multipart.getParam(param);
			}
		}
		return param;
	}
1177551
public static <T extends Collection<?>> T checkNotEmpty(final String name,
                                                            final T parameter) {
        if (parameter == null || parameter.size() == 0) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be filled!");
        }
        return parameter;
    }
665238
public Signature argName(int index, String name) {
        String[] argNames = Arrays.copyOf(argNames(), argNames().length);
        argNames[index] = name;
        return new Signature(type(), argNames);
    }
1291701
public Object invokeMethod(String name, Object args) {
        try {
            return super.invokeMethod(name, args);
        }
        // if the method was not found in the current scope (the script's methods)
        // let's try to see if there's a method closure with the same name in the binding
        catch (MissingMethodException mme) {
            try {
                if (name.equals(mme.getMethod())) {
                    Object boundClosure = getProperty(name);
                    if (boundClosure != null && boundClosure instanceof Closure) {
                        return ((Closure) boundClosure).call((Object[])args);
                    } else {
                        throw mme;
                    }
                } else {
                    throw mme;
                }
            } catch (MissingPropertyException mpe) {
                throw mme;
            }
        }
    }
1366078
public static <T> Parameters.Builder<T> logger(String name) {
        return Parameters.<T> builder().name(name);
    }
1315365
public String getParameter( String name )
    {
        if (_parameters == null || !_parameters.hasParameters())
            return null;

        List parameters = _parameters.getParameterValues(name);
        if(parameters != null && parameters.size() > 0)
            return (String)parameters.get(0);
        else return null;
    }
1246777
public String param(String name) {
		String pathValue = pathParams.get(name);
		return (pathValue == null) ? queryParam(name) : pathValue;
	}
1211595
public static String getTitle(final String namePattern, final String methodName,
                                  final Object instance, final Object... parameters) {
        final String finalPattern = namePattern
                .replaceAll("\\{method}", methodName)
                .replaceAll("\\{this}", String.valueOf(instance));
        final int paramsCount = parameters == null ? 0 : parameters.length;
        final Object[] results = new Object[paramsCount];
        for (int i = 0; i < paramsCount; i++) {
            results[i] = arrayToString(parameters[i]);
        }

        return MessageFormat.format(finalPattern, results);
    }
442963
public Object methodMissing(String name, Object arg) {
        Object[] args = (Object[])arg;

        if(args.length == 0)
			throw new MissingMethodException(name,getClass(),args);

		if(args[0] instanceof Closure) {
            // abstract bean definition
            return invokeBeanDefiningMethod(name, args);
		}
		else if(args[0] instanceof Class || args[0] instanceof RuntimeBeanReference || args[0] instanceof Map) {
			return invokeBeanDefiningMethod(name, args);
		}
		else if (args.length > 1 && args[args.length -1] instanceof Closure) {
			return invokeBeanDefiningMethod(name, args);
		}
        WebApplicationContext ctx = springConfig.getUnrefreshedApplicationContext();
        MetaClass mc = DefaultGroovyMethods.getMetaClass(ctx);
        if(!mc.respondsTo(ctx, name, args).isEmpty()){
            return mc.invokeMethod(ctx,name, args);
        }
        return this;
	}
91896
public String[] getParameterValues(String name)
    {
        List v=_httpRequest.getParameterValues(name);
        if (v==null)
            return null;
        String[]a=new String[v.size()];
        return (String[])v.toArray(a);
    }
640889
public List<String> params(String name) {
		List<String> values = queryParams.get(name);
		String value = pathParams.get(name);

		if (values == null) {
			return (value == null) ? Collections.<String>emptyList() : Collections.singletonList(value);
		}

		if (value == null) {
			return Collections.unmodifiableList(values);
		} else {
			List<String> aggregated = new ArrayList<String>(values.size() + 1);
			aggregated.addAll(values);
			aggregated.add(value);
			return Collections.unmodifiableList(aggregated);
		}
	}
1298406
public String param(final String name) {
        try {
            return request.getParameter(name);
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Can't parse request parameter [uri=" + request.getRequestURI() + ", method=" + request.getMethod() + ", parameterName=" + name + "]: " + e.getMessage());

            return null;
        }
    }
184615
public JsonArray getJsonArray(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonArray()) {
            throw Util.typeMismatch(name, el, "JsonArray");
        }
        return el.asJsonArray();
    }
502113
public String getParameter(String name) {
        String[] values = parameters.get(name);
        if (values == null) {
            return null;
        }

        if (values.length == 0) {
            return "";
        }
        return values[0];
    }
187244
function(name) {
        var list = this.getMethods();
        for (var i in list) {
            if (list[i].getName() === name) {
                return list[i];
            }
        }
        throw 'Method "' + name + '" does not exist.';
    }