ParameterizedPathMatcher implements PathMatcher { public Map<String, String> namedParameters(String pattern, String path) { return getOrCreatePattern(pattern).namedGroups(path); }  boolean isPattern(String string); boolean match(String pattern, String path); boolean matchStart(String pattern, String path); Map<String, String> namedParameters(String pattern, String path); String extractPathWithinPattern(String pattern, String path); Map<String, String> extractUriTemplateVariables(String pattern, String path); Comparator<String> getPatternComparator(String path); String combine(String pattern1, String pattern2);  }
@Test public void testNamedGroups() { ParameterizedPathMatcher pathMatcher = new ParameterizedPathMatcher(); assertMapValues(pathMatcher.namedParameters("com/(t?st.jsp:jsp)", "com/test.jsp"), "jsp", "test.jsp"); assertMapValues(pathMatcher.namedParameters("com/(*.jsp:jsp)", "com/test.jsp"), "jsp", "test.jsp"); assertMapValues(pathMatcher.namedParameters("com/(**:path)/test.jsp", "com/foo/test.jsp"), "path", "foo"); assertMapValues(pathMatcher.namedParameters("org/springframework/(**/*:view).jsp", "org/springframework/feed/foo.jsp"), "view", "feed/foo"); assertMapValues(pathMatcher.namedParameters("/user/(*:user)/found", "\\user\\stefan\\found"), "user", "stefan"); assertMapValues(pathMatcher.namedParameters("view/page/(*:pageId)", "view/page/23432"), "pageId", "23432"); assertMapValues(pathMatcher.namedParameters("view/(*:controller)/(*:pageId)", "view/image/12345"), "controller", "image", "pageId", "12345"); }