docs: @SuppressWarnings("unchecked")
  	public <T extends RepresentationModel<T>> T invokeProcessorsFor(T value, ResolvableType referenceType) {
  
  		Assert.notNull(value, "Value must not be null!");
  		Assert.notNull(referenceType, "Reference type must not be null!");
  
  		// For Resources implementations, process elements first
  		if (RepresentationModelProcessorHandlerMethodReturnValueHandler.COLLECTION_MODEL_TYPE
  				.isAssignableFrom(referenceType)) {
  
  			CollectionModel<?> collectionModel = (CollectionModel<?>) value;
  			Class<?> rawClass = referenceType.getRawClass();
  
  			if (rawClass == null) {
  				throw new IllegalArgumentException(String.format("%s does not expose a raw type!", referenceType));
  			}
  
  			ResolvableType elementTargetType = ResolvableType.forClass(CollectionModel.class, rawClass).getGeneric(0);
  			List<Object> result = new ArrayList<>(collectionModel.getContent().size());
  
  			for (Object element : collectionModel) {
  
  				ResolvableType elementType = ResolvableType.forClass(element.getClass());
  
  				if (!getRawType(elementTargetType).equals(elementType.getRawClass())) {
  					elementTargetType = elementType;
  				}
  
  				result.add(invokeProcessorsFor(element, elementTargetType));
  			}
  
  			if (RepresentationModelProcessorHandlerMethodReturnValueHandler.CONTENT_FIELD != null) {
  
  				ReflectionUtils.setField( //
  						RepresentationModelProcessorHandlerMethodReturnValueHandler.CONTENT_FIELD, //
  						collectionModel, //
  						result //
  				);
  			}
  		}
  
  		return (T) invokeProcessorsFor((Object) value, referenceType);
  	}