private void setTypeRef(Configuration conf) {
    String className = conf.get(CLASS_CONF_KEY);

    if (className == null) {
      throw new RuntimeException(CLASS_CONF_KEY + " is not set");
    }

    Class<?> clazz = null;
    try {
      clazz = conf.getClassByName(className);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("failed to instantiate class '" + className + "'", e);
    }

    typeRef = new TypeRef<M>(clazz){};
  }
private void setTypeRef(Configuration conf) {
    String className = conf.get(CLASS_CONF_KEY);

    if (className == null) {
      throw new RuntimeException(CLASS_CONF_KEY + " is not set");
    }

    Class<?> clazz = null;
    try {
      clazz = conf.getClassByName(className);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("failed to instantiate class '" + className + "'", e);
    }

    typeRef = new TypeRef<M>(clazz){};
  }
private void setTypeRef ( Configuration conf ) { String className = conf . get ( CLASS_CONF_KEY ) ; if ( className == null ) { throw new RuntimeException ( CLASS_CONF_KEY + " is not set" ) ; } Class < ? > clazz = null ; try { clazz = conf . getClassByName ( className ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( "failed to instantiate class '" + className + "'" , e ) ; } typeRef = new TypeRef < M > ( clazz ) { } ; }
set typeRef from conf
set typeRef from conf