code: public static<M extends Message> TypeRef<M> getTypeRef(Configuration jobConf, Class<?> genericClass) {
      String className = jobConf.get(CLASS_CONF_PREFIX + genericClass.getName());
      if (className == null) {
        throw new RuntimeException(CLASS_CONF_PREFIX + genericClass.getName() + " is not set");
      }
      return new TypeRef<M>(getProtobufClass(jobConf, className)){};
    }
docs: Returns TypeRef for the Protobuf class that was set using setClass(jobConf);