test_class.declarator: localAddress = "127.0.0.1"
test_class.original_string: String localAddress = "127.0.0.1";
test_class.type: String
test_class.var_name: localAddress
test_class.file: dubbo-common/src/test/java/org/apache/dubbo/common/utils/UrlUtilsTest.java
test_class.identifier: UrlUtilsTest
test_case.body: @Test
      public void testIsMatch4() {
          URL consumerUrl = URL.valueOf("dubbo://127.0.0.1:20880/com.xxx.XxxService?version=1.0.0&group=*");
          URL providerUrl = URL.valueOf("http://127.0.0.1:8080/com.xxx.XxxService?version=1.0.0&group=test");
          assertTrue(UrlUtils.isMatch(consumerUrl, providerUrl));
      }
test_case.class_method_signature: UrlUtilsTest.testIsMatch4()
test_case.full_signature: @Test public void testIsMatch4()
test_case.identifier: testIsMatch4
test_case.invocations: valueOf valueOf assertTrue isMatch
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsMatch4()
focal_class.declarator: URL_PARAM_STARTING_SYMBOL = "?"
focal_class.modifier: private final static
focal_class.original_string: private final static String URL_PARAM_STARTING_SYMBOL = "?";
focal_class.type: String
focal_class.var_name: URL_PARAM_STARTING_SYMBOL
focal_class.file: dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java
focal_class.identifier: UrlUtils
focal_class.class_method_signature: UrlUtils.parseURL(String address, Map<String, String> defaults)
focal_class.full_signature: public static URL parseURL(String address, Map<String, String> defaults)
focal_class.identifier: parseURL
focal_class.modifiers: public static
focal_class.parameters: (String address, Map<String, String> defaults)
focal_class.return: URL
focal_class.signature: URL parseURL(String address, Map<String, String> defaults)
focal_class.class_method_signature: UrlUtils.parseURLs(String address, Map<String, String> defaults)
focal_class.full_signature: public static List<URL> parseURLs(String address, Map<String, String> defaults)
focal_class.identifier: parseURLs
focal_class.modifiers: public static
focal_class.parameters: (String address, Map<String, String> defaults)
focal_class.return: List<URL>
focal_class.signature: List<URL> parseURLs(String address, Map<String, String> defaults)
focal_class.class_method_signature: UrlUtils.convertRegister(Map<String, Map<String, String>> register)
focal_class.full_signature: public static Map<String, Map<String, String>> convertRegister(Map<String, Map<String, String>> register)
focal_class.identifier: convertRegister
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Map<String, String>> register)
focal_class.return: Map<String, Map<String, String>>
focal_class.signature: Map<String, Map<String, String>> convertRegister(Map<String, Map<String, String>> register)
focal_class.class_method_signature: UrlUtils.convertSubscribe(Map<String, String> subscribe)
focal_class.full_signature: public static Map<String, String> convertSubscribe(Map<String, String> subscribe)
focal_class.identifier: convertSubscribe
focal_class.modifiers: public static
focal_class.parameters: (Map<String, String> subscribe)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> convertSubscribe(Map<String, String> subscribe)
focal_class.class_method_signature: UrlUtils.revertRegister(Map<String, Map<String, String>> register)
focal_class.full_signature: public static Map<String, Map<String, String>> revertRegister(Map<String, Map<String, String>> register)
focal_class.identifier: revertRegister
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Map<String, String>> register)
focal_class.return: Map<String, Map<String, String>>
focal_class.signature: Map<String, Map<String, String>> revertRegister(Map<String, Map<String, String>> register)
focal_class.class_method_signature: UrlUtils.revertSubscribe(Map<String, String> subscribe)
focal_class.full_signature: public static Map<String, String> revertSubscribe(Map<String, String> subscribe)
focal_class.identifier: revertSubscribe
focal_class.modifiers: public static
focal_class.parameters: (Map<String, String> subscribe)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> revertSubscribe(Map<String, String> subscribe)
focal_class.class_method_signature: UrlUtils.revertNotify(Map<String, Map<String, String>> notify)
focal_class.full_signature: public static Map<String, Map<String, String>> revertNotify(Map<String, Map<String, String>> notify)
focal_class.identifier: revertNotify
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Map<String, String>> notify)
focal_class.return: Map<String, Map<String, String>>
focal_class.signature: Map<String, Map<String, String>> revertNotify(Map<String, Map<String, String>> notify)
focal_class.class_method_signature: UrlUtils.revertForbid(List<String> forbid, Set<URL> subscribed)
focal_class.full_signature: public static List<String> revertForbid(List<String> forbid, Set<URL> subscribed)
focal_class.identifier: revertForbid
focal_class.modifiers: public static
focal_class.parameters: (List<String> forbid, Set<URL> subscribed)
focal_class.return: List<String>
focal_class.signature: List<String> revertForbid(List<String> forbid, Set<URL> subscribed)
focal_class.class_method_signature: UrlUtils.getEmptyUrl(String service, String category)
focal_class.full_signature: public static URL getEmptyUrl(String service, String category)
focal_class.identifier: getEmptyUrl
focal_class.modifiers: public static
focal_class.parameters: (String service, String category)
focal_class.return: URL
focal_class.signature: URL getEmptyUrl(String service, String category)
focal_class.class_method_signature: UrlUtils.isMatchCategory(String category, String categories)
focal_class.full_signature: public static boolean isMatchCategory(String category, String categories)
focal_class.identifier: isMatchCategory
focal_class.modifiers: public static
focal_class.parameters: (String category, String categories)
focal_class.return: boolean
focal_class.signature: boolean isMatchCategory(String category, String categories)
focal_class.class_method_signature: UrlUtils.isMatch(URL consumerUrl, URL providerUrl)
focal_class.full_signature: public static boolean isMatch(URL consumerUrl, URL providerUrl)
focal_class.identifier: isMatch
focal_class.modifiers: public static
focal_class.parameters: (URL consumerUrl, URL providerUrl)
focal_class.return: boolean
focal_class.signature: boolean isMatch(URL consumerUrl, URL providerUrl)
focal_class.class_method_signature: UrlUtils.isMatchGlobPattern(String pattern, String value, URL param)
focal_class.full_signature: public static boolean isMatchGlobPattern(String pattern, String value, URL param)
focal_class.identifier: isMatchGlobPattern
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String value, URL param)
focal_class.return: boolean
focal_class.signature: boolean isMatchGlobPattern(String pattern, String value, URL param)
focal_class.class_method_signature: UrlUtils.isMatchGlobPattern(String pattern, String value)
focal_class.full_signature: public static boolean isMatchGlobPattern(String pattern, String value)
focal_class.identifier: isMatchGlobPattern
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String value)
focal_class.return: boolean
focal_class.signature: boolean isMatchGlobPattern(String pattern, String value)
focal_class.class_method_signature: UrlUtils.isServiceKeyMatch(URL pattern, URL value)
focal_class.full_signature: public static boolean isServiceKeyMatch(URL pattern, URL value)
focal_class.identifier: isServiceKeyMatch
focal_class.modifiers: public static
focal_class.parameters: (URL pattern, URL value)
focal_class.return: boolean
focal_class.signature: boolean isServiceKeyMatch(URL pattern, URL value)
focal_class.class_method_signature: UrlUtils.classifyUrls(List<URL> urls, Predicate<URL> predicate)
focal_class.full_signature: public static List<URL> classifyUrls(List<URL> urls, Predicate<URL> predicate)
focal_class.identifier: classifyUrls
focal_class.modifiers: public static
focal_class.parameters: (List<URL> urls, Predicate<URL> predicate)
focal_class.return: List<URL>
focal_class.signature: List<URL> classifyUrls(List<URL> urls, Predicate<URL> predicate)
focal_class.class_method_signature: UrlUtils.isConfigurator(URL url)
focal_class.full_signature: public static boolean isConfigurator(URL url)
focal_class.identifier: isConfigurator
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: boolean
focal_class.signature: boolean isConfigurator(URL url)
focal_class.class_method_signature: UrlUtils.isRoute(URL url)
focal_class.full_signature: public static boolean isRoute(URL url)
focal_class.identifier: isRoute
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: boolean
focal_class.signature: boolean isRoute(URL url)
focal_class.class_method_signature: UrlUtils.isProvider(URL url)
focal_class.full_signature: public static boolean isProvider(URL url)
focal_class.identifier: isProvider
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: boolean
focal_class.signature: boolean isProvider(URL url)
focal_class.class_method_signature: UrlUtils.isRegistry(URL url)
focal_class.full_signature: public static boolean isRegistry(URL url)
focal_class.identifier: isRegistry
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: boolean
focal_class.signature: boolean isRegistry(URL url)
focal_class.class_method_signature: UrlUtils.isServiceDiscoveryRegistryType(URL url)
focal_class.full_signature: public static boolean isServiceDiscoveryRegistryType(URL url)
focal_class.identifier: isServiceDiscoveryRegistryType
focal_class.modifiers: public static
focal_class.parameters: (URL url)
focal_class.return: boolean
focal_class.signature: boolean isServiceDiscoveryRegistryType(URL url)
focal_class.class_method_signature: UrlUtils.isServiceDiscoveryRegistryType(Map<String, String> parameters)
focal_class.full_signature: public static boolean isServiceDiscoveryRegistryType(Map<String, String> parameters)
focal_class.identifier: isServiceDiscoveryRegistryType
focal_class.modifiers: public static
focal_class.parameters: (Map<String, String> parameters)
focal_class.return: boolean
focal_class.signature: boolean isServiceDiscoveryRegistryType(Map<String, String> parameters)
focal_class.class_method_signature: UrlUtils.isItemMatch(String pattern, String value)
focal_class.full_signature: static boolean isItemMatch(String pattern, String value)
focal_class.identifier: isItemMatch
focal_class.modifiers: static
focal_class.parameters: (String pattern, String value)
focal_class.return: boolean
focal_class.signature: boolean isItemMatch(String pattern, String value)
focal_class.class_method_signature: UrlUtils.parseServiceKey(String serviceKey)
focal_class.full_signature: public static String[] parseServiceKey(String serviceKey)
focal_class.identifier: parseServiceKey
focal_class.modifiers: public static
focal_class.parameters: (String serviceKey)
focal_class.return: String[]
focal_class.signature: String[] parseServiceKey(String serviceKey)
focal_method.body: public static boolean isMatch(URL consumerUrl, URL providerUrl) {
          String consumerInterface = consumerUrl.getServiceInterface();
          String providerInterface = providerUrl.getServiceInterface();
          //FIXME accept providerUrl with '*' as interface name, after carefully thought about all possible scenarios I think it's ok to add this condition.
          if (!(ANY_VALUE.equals(consumerInterface)
                  || ANY_VALUE.equals(providerInterface)
                  || StringUtils.isEquals(consumerInterface, providerInterface))) {
              return false;
          }
  
          if (!isMatchCategory(providerUrl.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY),
                  consumerUrl.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY))) {
              return false;
          }
          if (!providerUrl.getParameter(ENABLED_KEY, true)
                  && !ANY_VALUE.equals(consumerUrl.getParameter(ENABLED_KEY))) {
              return false;
          }
  
          String consumerGroup = consumerUrl.getParameter(GROUP_KEY);
          String consumerVersion = consumerUrl.getParameter(VERSION_KEY);
          String consumerClassifier = consumerUrl.getParameter(CLASSIFIER_KEY, ANY_VALUE);
  
          String providerGroup = providerUrl.getParameter(GROUP_KEY);
          String providerVersion = providerUrl.getParameter(VERSION_KEY);
          String providerClassifier = providerUrl.getParameter(CLASSIFIER_KEY, ANY_VALUE);
          return (ANY_VALUE.equals(consumerGroup) || StringUtils.isEquals(consumerGroup, providerGroup) || StringUtils.isContains(consumerGroup, providerGroup))
                  && (ANY_VALUE.equals(consumerVersion) || StringUtils.isEquals(consumerVersion, providerVersion))
                  && (consumerClassifier == null || ANY_VALUE.equals(consumerClassifier) || StringUtils.isEquals(consumerClassifier, providerClassifier));
      }
focal_method.class_method_signature: UrlUtils.isMatch(URL consumerUrl, URL providerUrl)
focal_method.full_signature: public static boolean isMatch(URL consumerUrl, URL providerUrl)
focal_method.identifier: isMatch
focal_method.invocations: getServiceInterface getServiceInterface equals equals isEquals isMatchCategory getParameter getParameter getParameter equals getParameter getParameter getParameter getParameter getParameter getParameter getParameter equals isEquals isContains equals isEquals equals isEquals
focal_method.modifiers: public static
focal_method.parameters: (URL consumerUrl, URL providerUrl)
focal_method.return: boolean
focal_method.signature: boolean isMatch(URL consumerUrl, URL providerUrl)