code: @SuppressWarnings("unchecked")
      public void fromDmr(Object entity, String javaName, ModelType dmrType, Class<?> propertyType, ModelNode dmrPayload) throws Exception {
  
          Method target = entity.getClass().getMethod(javaName, propertyType);
          List<ModelNode> items = dmrPayload.isDefined() ? dmrPayload.asList() : Collections.EMPTY_LIST;
  
          if(items.isEmpty()) {
              target.invoke(entity, Collections.EMPTY_LIST);
          }
          else
          {
              List list = new ArrayList(items.size());
  
              // java type is derived from list item dmr type
              ModelType listValueType = items.get(0).getType();
              for (ModelNode item : items) {
                  addJavaValueTo(list, listValueType, item);
              }
  
              target.invoke(entity, list);
          }
  
  
      }
docs: TODO handle composite values