private void appendFriendlyClassName(StringBuilder sb, Class<?> cl) {
        if (cl == null) {
            sb.append(cl);
            return;
        }
        if (cl.isPrimitive()) {
            sb.append(cl.getName());
        } else if (cl.isArray()) {
            appendFriendlyClassName(sb, cl.getComponentType());
            sb.append("[]");
        } else if (cl == String.class) {
            sb.append("String");
        } else if (cl == Date.class) {
            sb.append("Date");
        } else if (Number.class.isAssignableFrom(cl) && cl.getName().startsWith("java.lang.")
                || cl.getName().startsWith("java.math.")) {
            sb.append(cl.getName().substring(10));
        } else {
            sb.append(cl.getName());
        }
    }