private static boolean hasField(Class<?> aClass, String name) {
        for (Field field : aClass.getDeclaredFields()) {
            if (name.equals(field.getName())) {
                return true;
            }
        }
        return false;
    }
If some fields on the builder are null now, set them from the def. Do recursively.
<p>
If the targetDef has some schema incompatibilities, they are not handled here
(except logging in some cases), but in ConfigInstance.serialize().

@param  builder a {@link com.yahoo.config.ConfigBuilder}
@param  targetDef a config definition
@throws Exception if applying values form config definitions fails
configserver/src/main/java/com/yahoo/vespa/config/server/application/ConfigInstanceBuilder.java