public static <T extends Enum<T>> T getEnumValue(String primaryKey, Class<T> enumClazz) {
        String val = (String) CFG.get(primaryKey);
        if (val == null) {
            throw new SofaRpcRuntimeException(LogCodes.getLog(LogCodes.ERROR_NOT_FOUND_KEY, primaryKey));
        } else {
            return Enum.valueOf(enumClazz, val);
        }
    }
Gets enum value.

@param <T>        the type parameter
@param primaryKey the primary key
@param enumClazz  the enum clazz
@return the enum value
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java