public static String getName(Class<?> c) {
        if (c.isArray()) {
            StringBuilder sb = new StringBuilder();
            do {
                sb.append("[]");
                c = c.getComponentType();
            } while (c.isArray());

            return c.getName() + sb.toString();
        }
        return c.getName();
    }
@Test
    void testGetMethodName() throws Exception {
        assertThat(
                ReflectUtils.getName(Foo2.class.getDeclaredMethod("hello", int[].class)),
                equalTo("java.util.List hello(int[])"));
    }