private static String getName(final AnnotatedElement annotatedElement,
                                  final Supplier<String> defaultNameSupplier) {
        final JsonProperty jsonPropertyAnno = annotatedElement.getAnnotation(JsonProperty.class);
        if (jsonPropertyAnno == null) {
            return defaultNameSupplier.get();
        } else {
            final String jsonPropertyValue = jsonPropertyAnno.value();
            return jsonPropertyValue.isEmpty()
                    ? defaultNameSupplier.get()
                    : jsonPropertyValue;
        }
    }
@return otherValue if it is non-null or copyNulls is true, else thisValue
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java