private static <T> Constructor<T> getConstructor(Class<T> clazz)
    {
        if (ALWAYS_USE_SUN_REFLECTION_FACTORY)
            return OnDemandSunReflectionFactory.getConstructor(clazz,
                    OBJECT_CONSTRUCTOR);

        try
        {
            return clazz.getDeclaredConstructor((Class[]) null);
        }
        catch (SecurityException e)
        {
            if (NEVER_USE_SUN_REFLECTION_FACTORY) {
                return null;
            }
            return OBJECT_CONSTRUCTOR == null ? null
                    : OnDemandSunReflectionFactory.getConstructor(clazz,
                            OBJECT_CONSTRUCTOR);
        }
        catch (NoSuchMethodException e)
        {
            if (NEVER_USE_SUN_REFLECTION_FACTORY) {
                return null;
            }
            return OBJECT_CONSTRUCTOR == null ? null
                    : OnDemandSunReflectionFactory.getConstructor(clazz,
                            OBJECT_CONSTRUCTOR);
        }
    }
Returns an instatiator for the specified {@code clazz}.
protostuff-runtime/src/main/java/io/protostuff/runtime/RuntimeEnv.java