public static Constructor<?> getConstructor(Class<?> clazz, Class<?>... paramTypes) {
        Class<?>[] t = toPrimitiveTypeArray(paramTypes);
        for (Constructor<?> c : clazz.getConstructors()) {
            Class<?>[] types = toPrimitiveTypeArray(c.getParameterTypes());
            if (equalsTypeArray(types, t)) {
                return c;
            }
        }
        return null;
    }