public static <T extends BaseEnum<?>> Map<String, T> getEnumMap(final Class<T> clazz) {
        String className = clazz.getName();
        Map<?, BaseEnum<?>> result = ENUM_CACHE.computeIfAbsent(className, value -> {
            T[] baseEnums = clazz.getEnumConstants();
            return Arrays.stream(baseEnums)
                .collect(Collectors.toMap(BaseEnum::getCode, Function.identity()));
        });
        return (Map)result;
    }
Get the map of an enumerated code Enum

@param clazz enumeration class
@param <T> The type of enumeration
@return Map<code, Enum>
chat2db-server/chat2db-server-tools/chat2db-server-tools-common/src/main/java/ai/chat2db/server/tools/common/util/EasyEnumUtils.java