static Constructor[] getDeclaredConstructors(final Class clazz) {
        if (System.getSecurityManager() == null)
            return clazz.getDeclaredConstructors();
        else {
            return (Constructor[]) AccessController
                    .doPrivileged(new PrivilegedAction() {
                        public Object run() {
                            return clazz.getDeclaredConstructors();
                        }
                    });
        }
    }