@Test public void shouldReturnBaseUriAsNormalizedUrlPattern() { assertEquals("/xxx/{a_id}/yyy/{b_id}", new UrlPattern("/xxx/{a_id}/yyy/{b_id}").getPattern()); assertEquals("/xxx/{a_id}/yyy/{b_id}", new UrlPattern("/xxx/{a_id}/yyy/{b_id}.{format}").getPattern()); }
public String getPattern() { return getUrlPattern().replaceFirst(URL_FORMAT_REGEX, ""); }
UrlPattern implements UrlMatcher { public String getPattern() { return getUrlPattern().replaceFirst(URL_FORMAT_REGEX, ""); } }
UrlPattern implements UrlMatcher { public String getPattern() { return getUrlPattern().replaceFirst(URL_FORMAT_REGEX, ""); } UrlPattern(String path); }
UrlPattern implements UrlMatcher { public String getPattern() { return getUrlPattern().replaceFirst(URL_FORMAT_REGEX, ""); } UrlPattern(String path); void compile(); @Override boolean matches(String url); @Override UrlMatch match(String url); String getPattern(); List<String> getParameterNames(); @Override String toRegexPattern(String url); }
UrlPattern implements UrlMatcher { public String getPattern() { return getUrlPattern().replaceFirst(URL_FORMAT_REGEX, ""); } UrlPattern(String path); void compile(); @Override boolean matches(String url); @Override UrlMatch match(String url); String getPattern(); List<String> getParameterNames(); @Override String toRegexPattern(String url);  }