public static String getTypeStr(Class clazz) {
        String typeStr = ReflectCache.getTypeStrCache(clazz);
        if (typeStr == null) {
            if (clazz.isArray()) {
                String name = clazz.getName(); // 原始名字：[Ljava.lang.String;
                typeStr = jvmNameToCanonicalName(name); // java.lang.String[]
            } else {
                typeStr = clazz.getName();
            }
            ReflectCache.putTypeStrCache(clazz, typeStr);
        }
        return typeStr;
    }
@Test
    public void testGetTypeStr() {

        Assert.assertEquals(ClassTypeUtils.getTypeStr(String.class), "java.lang.String");

        Assert.assertEquals(ClassTypeUtils.getTypeStr(boolean.class), "boolean");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(byte.class), "byte");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(char.class), "char");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(double.class), "double");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(float.class), "float");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(int.class), "int");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(long.class), "long");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(short.class), "short");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(void.class), "void");

        // 本地类
        class LocalType {

        }
        Assert.assertEquals(ClassTypeUtils.getTypeStr(anonymous.getClass()),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$1");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(LocalType.class),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$2LocalType");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(MemberClass.class),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$MemberClass");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(StaticClass.class),
            "com.alipay.sofa.rpc.common.utils.StaticClass");

        Assert.assertEquals(ClassTypeUtils.getTypeStr(String[][][].class), "java.lang.String[][][]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(boolean[].class), "boolean[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(byte[].class), "byte[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(char[].class), "char[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(double[].class), "double[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(float[].class), "float[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(int[].class), "int[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(long[].class), "long[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(short[].class), "short[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(Array.newInstance(anonymous.getClass(), 2, 3).getClass()),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$1[][]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(LocalType[][].class),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$2LocalType[][]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(MemberClass[].class),
            "com.alipay.sofa.rpc.common.utils.ClassTypeUtilsTest$MemberClass[]");
        Assert.assertEquals(ClassTypeUtils.getTypeStr(StaticClass[].class),
            "com.alipay.sofa.rpc.common.utils.StaticClass[]");

        Assert.assertArrayEquals(ClassTypeUtils.getTypeStrs(new Class[] { String[].class }),
            new String[] { "java.lang.String[]" });
        Assert.assertArrayEquals(ClassTypeUtils.getTypeStrs(new Class[] { String[].class }, false),
            new String[] { "java.lang.String[]" });
        Assert.assertArrayEquals(ClassTypeUtils.getTypeStrs(new Class[] { String[].class }, true),
            new String[] { String[].class.getName() });

    }