@SuppressWarnings("unchecked")
  public <T> Class<T> getClass(String key, Class<? extends T> defaultValue, ClassLoader classLoader)
      throws ClassNotFoundException {
    Optional<Object> o = getRawValue(key);
    if (!o.isPresent()) {
      return (Class<T>) defaultValue;
    }

    if (o.get().getClass() == String.class) {
      return (Class<T>) Class.forName((String) o.get(), true, classLoader);
    }

    throw new IllegalArgumentException(
        "Configuration cannot evaluate object of class " + o.get().getClass() + " as a class name");
  }
Returns the class associated with the given key as a string.

@param <T> The type of the class to return.
@param key The key pointing to the associated value
@param defaultValue The optional default value returned if no entry exists
@param classLoader The class loader used to resolve the class.
@return The value associated with the given key, or the default value, if to entry for the key
    exists.
amoro-common/src/main/java/org/apache/amoro/config/Configurations.java