private void handleObjectEntry(String name, Inspector inspector) {
        try {
            NamedBuilder parentBuilder = stack.peek();
            if (inspector.type() == Type.OBJECT) {
                if (isMapField(parentBuilder, name)) {
                    parentBuilder.nameStack().push(name);
                    handleMap(inspector);
                    parentBuilder.nameStack().pop();
                    return;
                } else {
                    NamedBuilder builder = createBuilder(parentBuilder, name);
                    if (builder == null) return;  // Ignore non-existent struct class
                    stack.push(builder);
                }
            } else if (inspector.type() == Type.ARRAY) {
                for (int i = 0; i < inspector.children(); i++) {
                    parentBuilder.nameStack().push(name);
                }
            } else {  // leaf
                parentBuilder.nameStack().push(name);
            }
            handleValue(inspector);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
A utility class that can be used to apply a payload to a config builder.

TODO: This can be refactored a lot, since many of the reflection methods are duplicated

@author Ulf Lilleengen
@author hmusum
@author Tony Vaagenes
config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java