@SuppressWarnings("unchecked")
    public static <T extends Message> T getDefaultInstance(final String className) {
        final MethodHandle handle = DEFAULT_INSTANCE_METHODS_4J.get(className);
        if (handle == null) {
            throw new MessageClassNotFoundException(className + " not found");
        }
        try {
            return (T) handle.invoke();
        } catch (Throwable t) {
            throw new SerializationException(t);
        }
    }
Protobuf message factory.

@author boyan (boyan@alibaba-inc.com)

2018-Mar-26 4:44:20 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/rpc/ProtobufMsgFactory.java