class DiscoveryMatcher {
    @Autowired
    protected DiscoveryMatcherStrategy discoveryMatcherStrategy;

    public boolean match(String targetValues, String value, boolean returnValue) {<FILL_FUNCTION_BODY>}

    public boolean matchAddress(String addresses, String host, int port, boolean returnValue) {
        List<String> addressList = StringUtil.splitToList(addresses);

        // 如果精确匹配不满足，尝试用通配符匹配
        if (addressList.contains(host + ":" + port) || addressList.contains(host) || addressList.contains(String.valueOf(port))) {
            return returnValue;
        }

        // 通配符匹配。前者是通配表达式，后者是具体值
        for (String addressPattern : addressList) {
            if (discoveryMatcherStrategy.match(addressPattern, host + ":" + port) || discoveryMatcherStrategy.match(addressPattern, host) || discoveryMatcherStrategy.match(addressPattern, String.valueOf(port))) {
                return returnValue;
            }
        }

        return !returnValue;
    }
}

        List<String> targetValueList = StringUtil.splitToList(targetValues);

        // 如果精确匹配不满足，尝试用通配符匹配
        if (targetValueList.contains(value)) {
            return returnValue;
        }

        // 通配符匹配。前者是通配表达式，后者是具体值
        for (String targetValuePattern : targetValueList) {
            if (discoveryMatcherStrategy.match(targetValuePattern, value)) {
                return returnValue;
            }
        }

        return !returnValue;
    
<no_super_class>