return new HalLinkList(halResource, link.relation(),
getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class),
halClient);
} else if (Map.class.isAssignableFrom(method.getReturnType())) {
//noinspection unchecked
return new HalLinkMap(halResource, link.relation(), link.keyField(),
getCollectionType(method.getGenericReturnType(), 1, ResourceInfo.class),
halClient);
} else {
return halClient.getResource(halResource, method.getReturnType(),
getRelationHref(link, args, method.getParameterAnnotations()), false);