private static String signature(Method method) {
        final StringBuilder buf = new StringBuilder();
        final String returnTypeName = method.getReturnType().getName();
        if (returnTypeName.endsWith("Builder")) {
            // Normalize the self return type.
            buf.append("SELF ");
        } else {
            buf.append(returnTypeName).append(' ');
        }
        buf.append(method.getName()).append('(');
        boolean hasParameters = false;
        for (Class<?> parameterType : method.getParameterTypes()) {
            // Normalize the input string type.
            if (parameterType == CharSequence.class) {
                parameterType = String.class;
            }
            buf.append(parameterType.getName());
            buf.append(", ");
            hasParameters = true;
        }
        if (hasParameters) {
            buf.setLength(buf.length() - 2);
        }
        buf.append(')');
        return buf.toString();
    }
Generates the signature of the specified {@link Method}, normalizing inevitable differences between
{@link QueryParamGetters} and {@link HttpHeaderGetters} (or {@link QueryParamsBuilder} and
{@link HttpHeadersBuilder}).
core/src/test/java/com/linecorp/armeria/common/StringMultimapDerivedApiConsistencyTest.java