private <T> void inspectClass(final ObjectMapper objectMapper,
                                  final List<String> xPaths,
                                  final StringBuilder xPathBuilder,
                                  final String name,
                                  final Class<T> clazz,
                                  final int depth,
                                  boolean hasMultiple) throws Exception {

        if (depth <= 20) {
            final String padding = Strings.repeat(" ", (depth - 1) * 2);
//            final T object = clazz.getConstructor().newInstance();
            final JAXBContext jaxbContext = JAXBContext.newInstance(clazz);
            final JAXBIntrospector jaxbIntrospector = jaxbContext.createJAXBIntrospector();
//            final String elementName = jaxbIntrospector.getElementName(object).getLocalPart();

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

            final String xPath = xPathBuilder.toString();
            if (xPath.endsWith(name)
                    || xPath.endsWith(name + "[0]")
                    || (xPath.endsWith("/Groups/Group[0]") && name.equals("Groups"))) {
                // Hack to stop infinite recursion
            } else {
                xPathBuilder.append("/")
                        .append(name);
                if (hasMultiple) {
                    xPathBuilder.append("[0]");
                }
                xPaths.add(xPathBuilder.toString());

                System.out.println(LogUtil.message("{}{}, depth: {}, xpath: {}", padding, name, depth, xPathBuilder));

                for (final BeanPropertyDefinition property : beanDescription.findProperties()) {
                    inspectProperty(objectMapper, xPaths, xPathBuilder, depth, property);
                }
            }
        }
    }
<p>
This was a partial attempt at generating all the possible xpaths for the event logging schema,
baring infinite recursion.
</p><p>
Seems to be missing some elements due to getField returning null. Also is not doing anything about
choice elements or handling sub-classed things.
</p>
stroom-event-logging/stroom-event-logging-impl/src/test/java/stroom/event/logging/impl/GenerateXPaths.java