private static String getCanonicalName(String className) {
        className = StringUtils.deleteWhitespace(className);
        if (className == null) {
            return null;
        } else {
            int dim = 0;
            while (className.startsWith("[")) {
                dim++;
                className = className.substring(1);
            }
            if (dim < 1) {
                return className;
            } else {
                if (className.startsWith("L")) {
                    className = className.substring(
                        1,
                        className.endsWith(";")
                            ? className.length() - 1
                            : className.length());
                } else {
                    if (className.length() > 0) {
                        className = reverseAbbreviationMap.get(className.substring(0, 1));
                    }
                }
                StringBuilder canonicalClassNameBuffer = new StringBuilder(className);
                for (int i = 0; i < dim; i++) {
                    canonicalClassNameBuffer.append("[]");
                }
                return canonicalClassNameBuffer.toString();
            }
        }
    }
<p>Converts a given name of class into canonical format.
If name of class is not a name of array class it returns
unchanged name.</p>
<p>Example:
<ul>
<li>{@code getCanonicalName("[I") = "int[]"}</li>
<li>{@code getCanonicalName("[Ljava.lang.String;") = "java.lang.String[]"}</li>
<li>{@code getCanonicalName("java.lang.String") = "java.lang.String"}</li>
</ul>
</p>

@param className the name of class
@return canonical form of class name
@since 2.4
android/android_framework/base/src/main/java/lang3/ClassUtils.java