protected static <T> T createMessageInstance(Class<T> clazz)
    {
        try
        {
            return clazz.newInstance();
        }
        catch (IllegalAccessException e)
        {
            try
            {
                Constructor<T> constructor = clazz.getDeclaredConstructor();
                constructor.setAccessible(true);
                return constructor.newInstance();
            }
            catch (NoSuchMethodException ne)
            {
                throw new RuntimeException(ne);
            }
            catch (IllegalArgumentException ne)
            {
                throw new RuntimeException(ne);
            }
            catch (IllegalAccessException ne)
            {
                throw new RuntimeException(ne);
            }
            catch (InvocationTargetException ne)
            {
                throw new RuntimeException(ne);
            }
            catch (InstantiationException ne)
            {
                throw new RuntimeException(ne);
            }
        }
        catch (InstantiationException e)
        {
            throw new RuntimeException(e);
        }
    }
If this method returns null, the clazz was not registered as a delegate.
protostuff-runtime/src/main/java/io/protostuff/runtime/IdStrategy.java