code: private static void setValue(Object target, String field, Object value) {
          // TODO: Should we do this for all numbers, not just '0'?
          if ("0".equals(field)) {
  
              if (!(target instanceof Collection)) {
                  throw new IllegalArgumentException(
                          "Cannot evaluate '0' on object " + target);
              }
  
              @SuppressWarnings("unchecked")
              Collection<Object> collection = (Collection<Object>) target;
              collection.add(value);
  
          } else {
  
              Method setter = findMethod(target, "set" + field, value.getClass());
  
              try {
                  setter.invoke(target, value);
  
              } catch (IllegalAccessException exception) {
                  throw new IllegalStateException(
                          "Unable to access setter method",
                          exception);
  
              } catch(InvocationTargetException exception) {
                  if (exception.getCause() instanceof RuntimeException) {
                      throw (RuntimeException) exception.getCause();
                  }
                  throw new IllegalStateException(
                          "Checked exception thrown from setter method",
                          exception);
              }
          }
      }
docs: Uses reflection to set the value of the given property on the target
  object.
  
  @param target the object to reflect on
  @param field the name of the property to set
  @param value the new value of the property