private void updatePropertyFromConfigAnnotations(final ConfigProperty configProperty,
                                                     final Prop prop) {
        // Editable by default unless found otherwise below
        configProperty.setEditable(true);

        prop.getAnnotation(JsonPropertyDescription.class)
                .ifPresent(jsonPropertyDescription ->
                        configProperty.setDescription(jsonPropertyDescription.value()));

        if (prop.hasAnnotation(ReadOnly.class)) {
            configProperty.setEditable(false);
        }

        if (prop.hasAnnotation(Password.class)) {
            configProperty.setPassword(true);
        }

        prop.getAnnotation(RequiresRestart.class)
                .ifPresent(requiresRestart -> {
                    RequiresRestart.RestartScope scope = requiresRestart.value();
                    switch (scope) {
                        case SYSTEM:
                            configProperty.setRequireRestart(true);
                            break;
                        case UI:
                            configProperty.setRequireUiRestart(true);
                            break;
                        default:
                            throw new RuntimeException("Should never get here");
                    }
                });

        configProperty.setDataTypeName(getDataTypeName(prop.getValueType()));
    }
@param dbConfigProperty The config property object obtained from the database
@return The updated typed value from the object model
stroom-config/stroom-config-global-impl/src/main/java/stroom/config/global/impl/ConfigMapper.java