public static <T> Map<String, Prop> getProperties(final ObjectMapper objectMapper, final T object) {
        final Class<T> clazz = (Class<T>) object.getClass();

        final JavaType userType = objectMapper.getTypeFactory().constructType(object.getClass());
        final BeanDescription beanDescription =
                objectMapper.getSerializationConfig().introspect(userType);

        final List<BeanPropertyDefinition> beanPropDefs = beanDescription.findProperties();
        // enum types seem to have a declaringClass prop that results in a stack overflow
        final Map<String, Prop> propMap = beanPropDefs.stream()
                .filter(propDef ->
                        !((object instanceof Enum<?>) && propDef.getName().equals("declaringClass")))
                .filter(propDef ->
                        !((object instanceof List<?>)))
                .map(propDef -> {
                    final Prop prop = new Prop(propDef.getName(), object);
                    if (propDef.getField() != null) {
                        propDef.getField()
                                .getAllAnnotations()
                                .annotations()
                                .forEach(prop::addFieldAnnotation);
                    }
                    if (propDef.hasGetter()) {
                        prop.setGetter(propDef.getGetter().getAnnotated());
                    } else {
                        throw new RuntimeException("Property " + propDef.getName() + " on " + clazz.getName() +
                                                   " has no getter. Do the constructor and field/getter " +
                                                   "@JsonProperty names match up?");
                    }
                    if (propDef.hasSetter()) {
                        prop.setSetter(propDef.getSetter().getAnnotated());
                    }
                    return prop;
                })
                .collect(Collectors.toMap(Prop::getName, Function.identity()));

        return propMap;
    }
Builds a map of property names to a {@link Prop} object that provides access to the getter/setter.
Only includes public properties, not package private
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java