组合参数数值为一个字符串 这些参数必须实现toString();

@param invocation
MethodInvocation
@return String
160011
public String getArguments(MethodInvocation invocation) {

		try {
			Object[] args = invocation.getArguments();
			if (args == null)
				return null;
			if (args.length != 1)
				return null;// 参数是一个主键

			if (args[0] == null)
				return null;
			return args[0].toString();
		} catch (Exception ex) {
			Debug.logError("[JdonFramework] method:"
					+ invocation.getMethod().getName() + "  " + ex, module);
			return null;
		}

	}
817389
protected function toString()
    {
        if ($this->rendered !== null) {
            return $this->rendered;
        }

        if (is_callable($this->callback)) {
            try {
                return $this->rendered = $this->invokeCallable($this->callback, $this->callbackArguments);
            } catch (\Exception $e) {
                trigger_error($e->getMessage(), E_USER_NOTICE);
            }
        }

        return $this->content ?: '';
    }
102234
public function invoke(MethodInvocation $invocation)
    {
        $object = $invocation->getThis();
        /* @var $formValidation FormValidation */
        $method = $invocation->getMethod();
        $formValidation = $this->reader->getMethodAnnotation($method, AbstractValidation::class);
        $form = $this->getFormProperty($formValidation, $object);
        $data = $form instanceof SubmitInterface ? $form->submit() : $this->getNamedArguments($invocation);
        $isValid = $this->isValid($data, $form);
        if ($isValid === true) {
            // validation   success
            return $invocation->proceed();
        }

        return $this->failureHandler->handle($formValidation, $invocation, $form);
    }
113663
public function invoke(MethodInvocation $invocation)
    {
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        $keys = $this->generateCacheName($annotation->cacheName, $invocation);
        if (!is_array($annotation->key)) {
            $annotation->key = [$annotation->key];
        }
        $keys = $this->detectCacheKeys($invocation, $annotation, $keys);
        // detect use cache driver
        $cache = $this->detectCacheRepository($annotation);
        $result = $invocation->proceed();
        if ($result !== null) {
            $cache->put($this->recursiveImplode($this->join, $keys), $result, $annotation->lifetime);
        }

        return $result;
    }
952349
private function invocationDomain(ReflectionInvocation $invocation): string
    {
        //Translation using default bundle
        $domain = $this->config->getDefaultDomain();

        if ($invocation->getName() === 'say') {
            //Let's try to confirm domain
            $domain = $this->config->resolveDomain($invocation->getClass());
        }

        //`l` and `p`, `say` functions
        $argument = null;
        switch (strtolower($invocation->getName())) {
            case 'say':
            case 'l':
                if ($invocation->countArguments() >= 3) {
                    $argument = $invocation->getArgument(2);
                }
                break;
            case 'p':
                if ($invocation->countArguments() >= 4) {
                    $argument = $invocation->getArgument(3);
                }
        }

        if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING) {
            //Domain specified in arguments
            $domain = $this->config->resolveDomain($argument->stringValue());
        }

        return $domain;
    }
226705
@Override
	public Object invoke(final Invocation invocation) throws Exception {
		if (invocation == null) throw new NullPointerException("invocation");

		MethodDescriptor<?, ?> method = invocation.getMethod();
		DataTypeDescriptor<?> resultd = (DataTypeDescriptor<?>) method.getResult();
		MessageDescriptor<? extends Message> excd = descriptor.getExc();

		RpcRequest request = protocol.getRequest(invocation);
		return session.send(request, resultd, excd);
	}
430159
private String toStringImpl() throws Exception {

        StringBuffer sb;
        Method[]     methods;
        Method       method;
        int          count;

        sb = new StringBuffer();

        sb.append(super.toString());

        count = getParameterCount();

        if (count == 0) {
            sb.append("[parameterCount=0]");

            return sb.toString();
        }
        methods = getClass().getDeclaredMethods();

        sb.append('[');

        int len = methods.length;

        for (int i = 0; i < count; i++) {
            sb.append('\n');
            sb.append("    parameter_");
            sb.append(i + 1);
            sb.append('=');
            sb.append('[');

            for (int j = 0; j < len; j++) {
                method = methods[j];

                if (!Modifier.isPublic(method.getModifiers())) {
                    continue;
                }

                if (method.getParameterTypes().length != 1) {
                    continue;
                }
                sb.append(method.getName());
                sb.append('=');
                sb.append(method.invoke(this,
                                        new Object[] { new Integer(i + 1) }));

                if (j + 1 < len) {
                    sb.append(',');
                    sb.append(' ');
                }
            }
            sb.append(']');

            if (i + 1 < count) {
                sb.append(',');
                sb.append(' ');
            }
        }
        sb.append('\n');
        sb.append(']');

        return sb.toString();
    }
1329713
private Description matchInvocation(
      ExpressionTree tree,
      MethodSymbol symbol,
      List<? extends ExpressionTree> args,
      VisitorState state) {
    if (!ASTHelpers.hasAnnotation(symbol, FormatMethod.class, state)) {
      return Description.NO_MATCH;
    }

    Type stringType = state.getSymtab().stringType;

    List<VarSymbol> params = symbol.getParameters();
    int firstStringIndex = -1;
    int formatString = -1;
    for (int i = 0; i < params.size(); i++) {
      VarSymbol param = params.get(i);
      if (ASTHelpers.hasAnnotation(param, FormatString.class, state)) {
        formatString = i;
        break;
      }
      if (firstStringIndex < 0 && ASTHelpers.isSameType(params.get(i).type, stringType, state)) {
        firstStringIndex = i;
      }
    }

    if (formatString < 0) {
      formatString = firstStringIndex;
    }

    FormatStringValidation.ValidationResult result =
        StrictFormatStringValidation.validate(
            args.get(formatString), args.subList(formatString + 1, args.size()), state);

    if (result != null) {
      return buildDescription(tree).setMessage(result.message()).build();
    } else {
      return Description.NO_MATCH;
    }
  }
1111062
public function toString()
    {
        $string = '';
        $methods = $this->getIterator();
        foreach ($methods as $method) {
            $string .= $method->toString();
        }

        return $string;
    }
137634
public RpcRequest getRequest(final Invocation invocation) {
		if (invocation == null) throw new NullPointerException("invocation");

		MethodDescriptor<?, ?> method = invocation.getMethod();
		if (!method.isTerminal()) {
			throw new IllegalArgumentException("Last invocation method must be terminal");
		}

		RpcRequest request = new RpcRequest(method.isPost() ? RpcRequest.POST : RpcRequest.GET);
		for (Invocation invocation1 : invocation.toChain()) {
			writeInvocation(request, invocation1);
		}

		return request;
	}
719122
public static String generateMethodType(MethodType source) {
        StringBuilder builder = new StringBuilder("MethodType.methodType(");
        buildClassArgument(builder, source.returnType());
        if (source.parameterCount() > 0) {
            builder.append(", ");
            buildClassArguments(builder, source.parameterArray());
        }
        builder.append(")");
        return builder.toString();
    }
779699
@Override
    public CRLReason getRevocationReason() {
        Extension ext = getExtension(PKIXExtensions.ReasonCode_Id);
        if (ext == null) {
            return null;
        }
        CRLReasonCodeExtension rcExt = (CRLReasonCodeExtension) ext;
        return rcExt.getReasonCode();
    }
490335
public function alterTextarea(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($fieldName, $options) = array_pad($invocation->getArguments(), 2, null);
        $options = (array)$options;
        $options = $this->_addClass($helper, $options, 'form-control');

        $this->_addTemplates($helper);
        $this->setProperty($invocation, 'arguments', [$fieldName, $options]);

        return $invocation->proceed();
    }
1246510
@Deprecated
    public String printInvocations(Object ... mocks) {
        String out = "";
        List<Invocation> invocations = AllInvocationsFinder.find(asList(mocks));
        out += line("********************************");
        out += line("*** Mockito interactions log ***");
        out += line("********************************");
        for(Invocation i:invocations) {
            out += line(i.toString());
            out += line(" invoked: " + i.getLocation());
            if (i.stubInfo() != null) {
                out += line(" stubbed: " + i.stubInfo().stubbedAt().toString());
            }
        }

        invocations = unusedStubsFinder.find(asList(mocks));
        if (invocations.isEmpty()) {
            return print(out);
        }
        out += line("********************************");
        out += line("***       Unused stubs       ***");
        out += line("********************************");

        for(Invocation i:invocations) {
            out += line(i.toString());
            out += line(" stubbed: " + i.getLocation());
        }
        return print(out);
    }
1292133
public static Object invokeMethod(Object bean, Method method, Object... args) throws Exception {
        Class<?>[] types    = method.getParameterTypes();
        int        argCount = args == null ? 0 : args.length;
        // 参数个数对不上
        if (argCount != types.length) {
            throw new IllegalStateException(String.format("%s in %s", method.getName(), bean));
        }

        // 转参数类型
        for (int i = 0; i < argCount; i++) {
            args[i] = cast(args[i], types[i]);
        }
        return method.invoke(bean, args);
    }
188820
public function invoke(MethodInvocation $invocation)
    {
        /** @var ReflectionMethod $method */
        $method = $invocation->getMethod();
        $assisted = $method->getAnnotation(Assisted::class);
        /* @var \Ray\Di\Di\Assisted $assisted */
        $parameters = $method->getParameters();
        $arguments = $invocation->getArguments()->getArrayCopy();
        if ($assisted instanceof Assisted && $method instanceof ReflectionMethod) {
            $this->methodInvocationProvider->set($invocation);
            $arguments = $this->injectAssistedParameters($method, $assisted, $parameters, $arguments);
        }
        $invocation->getArguments()->exchangeArray($arguments);

        return $invocation->proceed();
    }
628827
protected function logFormatter(LoggableAnnotate $annotation, MethodInvocation $invocation): array
    {
        $context = [];
        $arguments = $invocation->getArguments();
        foreach ($invocation->getMethod()->getParameters() as $parameter) {
            $context['args'][$parameter->name] =
                !isset($arguments[$parameter->getPosition()]) ?
                    $parameter->getDefaultValue() : $arguments[$parameter->getPosition()];
        }

        return [
            'level'   => $annotation->value,
            'message' => sprintf(
                $this->format,
                $annotation->name,
                $invocation->getMethod()->class,
                $invocation->getMethod()->name
            ),
            'context' => $context,
        ];
    }