@Test public void testArray() { LOG.info("Array"); FieldProcessor<TestClassE[]> instance = new FieldProcessor(TestClassE[].class); TestClassE item1 = new TestClassE("10"); TestClassE item2 = new TestClassE("20"); TestClassE array[] = {item1, item2}; instance.processLinks(array, mockUriInfo, mockRmc, mockRlcc); assertEquals("widgets/10", array[0].link); assertEquals("widgets/20", array[1].link); }
void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c); }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c);  }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c);   }