private static void getPropsFromMethods(final Object object, final Map<String, Prop> propMap) {
        final Class<?> clazz = object.getClass();
        // Using getMethods rather than getDeclaredMethods means we have to make the methods public
        // but it does allow us to see inherited methods, e.g. on CommonDbConfig
        final Method[] methods = clazz.getMethods();
        final List<String> propsWithGetter = new ArrayList<>();
        final List<String> propsWithSetter = new ArrayList<>();

        for (final Method method : methods) {
            final String methodName = method.getName();

            if (method.getDeclaredAnnotation(JsonIgnore.class) == null) {
                if (methodName.startsWith("is")) {
                    // Boolean Getter.

                    if (methodName.length() > 2
                        && method.getParameterTypes().length == 0
                        && !method.getReturnType().equals(Void.TYPE)) {
                        final String name = getPropertyName(methodName, 2);
//                        final String name = getName(method, () ->
//                                getPropertyName(methodName, 2));
                        final Prop prop = propMap.computeIfAbsent(name, k -> new Prop(name, object));
                        prop.setGetter(method);
                        propsWithGetter.add(name);
                    }

                } else if (methodName.startsWith("get")) {
                    // Getter.

                    if (methodName.length() > 3
                        && !methodName.equals("getClass")
                        && method.getParameterTypes().length == 0
                        && !method.getReturnType().equals(Void.TYPE)) {
                        final String name = getPropertyName(methodName, 3);
//                        final String name = getName(method, () ->
//                                getPropertyName(methodName, 3));
                        final Prop prop = propMap.computeIfAbsent(name, k -> new Prop(name, object));
                        prop.setGetter(method);
                        propsWithGetter.add(name);
                    }
                } else if (methodName.startsWith("set")) {
                    // Setter.

                    if (methodName.length() > 3
                        && method.getParameterTypes().length == 1
                        && method.getReturnType().equals(Void.TYPE)) {
                        final String name = getPropertyName(methodName, 3);
//                        final String name = getName(method, () -> getPropertyName(methodName, 3));
                        final Prop prop = propMap.computeIfAbsent(name, k -> new Prop(name, object));
                        prop.setSetter(method);
                        propsWithSetter.add(name);
                    }
                }
            }
        }
    }
@return otherValue if it is non-null or copyNulls is true, else thisValue
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java