@Test public void adds_OPTIONS_HttpMethodThatGenerated_WADL_Response() { ResourceDescriptor resource = new AbstractResourceDescriptor(SampleRootResource.class); assertNotNull(resource.getResourceMethods().get("OPTIONS")); assertEquals(1, resource.getResourceMethods().get("OPTIONS").size()); ResourceMethodDescriptor methodDescriptor = resource.getResourceMethods().get("OPTIONS").get(0); assertNull(methodDescriptor.getMethod()); assertEquals("OPTIONS", methodDescriptor.getHttpMethod()); assertEquals(newArrayList(WILDCARD_TYPE), methodDescriptor.consumes()); assertEquals(newArrayList(new MediaType("application", "vnd.sun.wadl+xml")), methodDescriptor.produces()); assertEquals(SampleRootResource.class, methodDescriptor.getParentResource().getObjectClass()); assertTrue(methodDescriptor.getMethodParameters().isEmpty()); }
@Override public Map<String, List<ResourceMethodDescriptor>> getResourceMethods() { return resourceMethods; }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<String, List<ResourceMethodDescriptor>> getResourceMethods() { return resourceMethods; } }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<String, List<ResourceMethodDescriptor>> getResourceMethods() { return resourceMethods; } AbstractResourceDescriptor(Class<?> resourceClass);  AbstractResourceDescriptor(String path, Class<?> resourceClass);  AbstractResourceDescriptor(Object resource);  AbstractResourceDescriptor(String path, Object resource); }
AbstractResourceDescriptor extends BaseObjectModel implements ResourceDescriptor { @Override public Map<String, List<ResourceMethodDescriptor>> getResourceMethods() { return resourceMethods; } 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<String, List<ResourceMethodDescriptor>> getResourceMethods() { return resourceMethods; } 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();  }