class DiscoveryExpressionResolver {
    public static final ExpressionParser EXPRESSION_PARSER = new SpelExpressionParser();

    public static boolean eval(String expression, String key, Map<String, String> map, TypeComparator typeComparator) {
        StandardEvaluationContext context = new StandardEvaluationContext();
        context.setTypeComparator(typeComparator);
        if (map != null) {
            context.setVariable(key, map);
        } else {
            context.setVariable(key, new HashMap<String, String>());
        }

        return eval(expression, context);
    }

    public static boolean eval(String expression, StandardEvaluationContext context) {
        try {
            Boolean result = EXPRESSION_PARSER.parseExpression(expression).getValue(context, Boolean.class);

            return result != null ? result.booleanValue() : false;
        } catch (Exception e) {
            return false;
        }
    }

    public static final Pattern EXPRESSION_PATTERN = Pattern.compile(DiscoveryConstant.EXPRESSION_REGEX);

    public static List<String> extractList(String expression) {<FILL_FUNCTION_BODY>}

    public static final Pattern EXPRESSION_SINGLE_QUOTES_PATTERN = Pattern.compile(DiscoveryConstant.EXPRESSION_SINGLE_QUOTES_REGEX);

    public static Map<String, String> extractMap(String expression) {
        Map<String, String> map = new LinkedHashMap<String, String>();

        Matcher matcher = EXPRESSION_SINGLE_QUOTES_PATTERN.matcher(expression);
        int index = 0;
        String key = null;
        while (matcher.find()) {
            String group = matcher.group();
            if (group.startsWith(DiscoveryConstant.EXPRESSION_SINGLE_QUOTES) && group.endsWith(DiscoveryConstant.EXPRESSION_SINGLE_QUOTES)) {
                String name = StringUtils.substringBetween(group, DiscoveryConstant.EXPRESSION_SINGLE_QUOTES, DiscoveryConstant.EXPRESSION_SINGLE_QUOTES).trim();
                if (index % 2 == 0) {
                    // 偶数个元素为Key
                    key = name;
                } else if (index % 2 == 1) {
                    // 奇数个元素为Value
                    map.put(key, name);
                }

                index++;
            }
        }

        return map;
    }
}

        List<String> list = new ArrayList<String>();

        Matcher matcher = EXPRESSION_PATTERN.matcher(expression);
        while (matcher.find()) {
            String group = matcher.group();
            String name = StringUtils.substringBetween(group, DiscoveryConstant.EXPRESSION_SUB_PREFIX, DiscoveryConstant.EXPRESSION_SUB_SUFFIX).trim();

            list.add(name);
        }

        return list;
    
<no_super_class>