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 testGetConstructorName() {
        Constructor c = Foo2.class.getConstructors()[0];
        assertThat(ReflectUtils.getName(c), equalTo("(java.util.List,int[])"));
    }