code: public static void setBeanProperty(Object object, String prop, String value,
                                       Map<String, Object> objects) {
      prop = makePropertyName(prop);
      try {
        boolean found = false;
        Method[] methods = object.getClass().getMethods();
        for (int ix = 0; ix < methods.length && !found; ix++) {
          if (!methods[ix].getName().equals(prop))
            continue;
          if (methods[ix].getParameterTypes().length != 1)
            continue;
  
          Class type = methods[ix].getParameterTypes()[0];
          methods[ix].invoke(object, convertToType(value, type, objects));
          found = true;
        }
  
        if (!found)
          throw new DukeConfigException("Couldn't find method '" + prop + "' in " +
                                        "class " + object.getClass());
      } catch (IllegalArgumentException e) {
        throw new DukeConfigException("Couldn't set bean property " + prop +
                                      " on object of class " + object.getClass() +
                                      ": " + e);
      } catch (IllegalAccessException e) {
        throw new DukeException(e);
      } catch (InvocationTargetException e) {
        throw new DukeConfigException("Couldn't set bean property " + prop +
                                      " on object of class " + object.getClass() +
                                      ": " + e);
      }
    }
docs: Calls the named bean setter property on the object, converting
  the given value to the correct type. Note that parameter 'prop'
  is converted to a method name according to Lisp convention:
  (foo-bar), and not the usual Java dromedaryCase (fooBar). So
  "foo-bar" will become "setFooBar".
  
  <p>The value conversion is mostly straightforward, except that if
  the type of the method's first parameter is not a
  java.lang.Something, then the method will assume that the value
  is the name of an object in the 'objects' map, and pass that.
  
  <p>Further, if the type is a Collection, the method will assume
  the value is a list of object names separated by whitespace.