public T createInstance(final Function<String, Object> propertyValueSupplier) {
            // For each property in the arg list, extract its value
            final Object[] args = constructorArgList.stream()
                    .map(propertyValueSupplier)
                    .toArray(Object[]::new);
            try {
                if (constructor == null) {
                    throw new RuntimeException("Missing @JsonCreator constructor for class " + objectClass.getName());
                }
                return constructor.newInstance(args);
            } catch (InvocationTargetException
                     | IllegalAccessException
                     | InstantiationException
                     | IllegalArgumentException e) {
                throw new RuntimeException(
                        LogUtil.message("Error creating new instance of {} with args {}. Message: {}",
                                objectClass.getName(),
                                args,
                                NullSafe.get(e, Throwable::getMessage)),
                        e);
            }
        }
@return otherValue if it is non-null or copyNulls is true, else thisValue
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java