code: public static<M extends TBase<?, ?>> 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");
      }
  
      Class<?> tClass = null;
      try {
        tClass = jobConf.getClassByName(className);
      } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);
      }
  
      verifyAncestry(tClass);
  
      return new TypeRef<M>(tClass){};
    }
docs: Returns TypeRef for the Thrift class that was set using setClass(jobConf);