public static <I> Class<? extends I> getClass(Configuration conf, ConfVars var,
                                                Class<? extends I> defaultValue,
                                                Class<I> xface) {
    assert var.defaultVal.getClass() == String.class;
    String val = conf.get(var.varname);
    return val == null ? conf.getClass(var.hiveName, defaultValue, xface) :
        conf.getClass(var.varname, defaultValue, xface);
  }
Get a class instance based on a configuration value
@param conf configuration file to retrieve it from
@param var variable to retrieve
@param defaultValue default class to return if the value isn't set
@param xface interface that class must implement
@param <I> interface that class implements
@return instance of the class
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java