@Test public void sortsSubResourceLocatorsByUriPatter() { ResourceDescriptor resource = new AbstractResourceDescriptor(ResourceForTestSortingOfSubResourceLocators.class); Map<UriPattern, SubResourceLocatorDescriptor> resourceLocators = resource.getSubResourceLocators(); assertEquals(newArrayList("/b/c/d", "/b/c/z", "/b/c", "/b/{c}", "/b"), resourceLocators.keySet().stream().map(UriPattern::getTemplate).collect(toList())); }
@Override public Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators() { return subResourceLocators; }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators() { return subResourceLocators; } }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators() { return subResourceLocators; } AbstractResourceDescriptor(Class<?> resourceClass);  AbstractResourceDescriptor(String path, Class<?> resourceClass);  AbstractResourceDescriptor(Object resource);  AbstractResourceDescriptor(String path, Object resource); }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators() { return subResourceLocators; } AbstractResourceDescriptor(Class<?> resourceClass);  AbstractResourceDescriptor(String path, Class<?> resourceClass);  AbstractResourceDescriptor(Object resource);  AbstractResourceDescriptor(String path, Object resource); @Override PathValue getPathValue(); @Override Map<String, List<ResourceMethodDescriptor>> getResourceMethods(); @Override Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators(); @Override Map<UriPattern, Map<String, List<SubResourceMethodDescriptor>>> getSubResourceMethods(); @Override UriPattern getUriPattern(); @Override boolean isRootResource(); @Override String toString(); }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators() { return subResourceLocators; } AbstractResourceDescriptor(Class<?> resourceClass);  AbstractResourceDescriptor(String path, Class<?> resourceClass);  AbstractResourceDescriptor(Object resource);  AbstractResourceDescriptor(String path, Object resource); @Override PathValue getPathValue(); @Override Map<String, List<ResourceMethodDescriptor>> getResourceMethods(); @Override Map<UriPattern, SubResourceLocatorDescriptor> getSubResourceLocators(); @Override Map<UriPattern, Map<String, List<SubResourceMethodDescriptor>>> getSubResourceMethods(); @Override UriPattern getUriPattern(); @Override boolean isRootResource(); @Override String toString();  }