@Test public void processesSecurityAnnotationFromMethod() { ResourceDescriptor resource = new AbstractResourceDescriptor(ResourceWithMethodWithSecurityAnnotation.class); List<ResourceMethodDescriptor> resourceMethods = resource.getResourceMethods().get("GET"); assertEquals(1, resourceMethods.get(0).getAnnotations().length); RolesAllowed rolesAllowed = (RolesAllowed)resourceMethods.get(0).getAnnotations()[0]; assertNotNull(rolesAllowed); }
@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();  }