private static List<Property> create(final Key key) {
        final Map<String, List<Method>> methodMap = new HashMap<>();

        for (final Method method : key.clazz.getMethods()) {
            if (isGetter(method) || isSetter(method)) {
                final String propertyName = getPropertyName(method);

                final XmlTransient xmlTransient = method.getAnnotation(XmlTransient.class);

                // Ignore transient fields.
                if (xmlTransient == null) {
                    if (!(key.omitAuditFields && DocumentEntity.AUDIT_FIELDS.contains(propertyName))) {
                        methodMap.computeIfAbsent(propertyName, name -> new ArrayList<>()).add(method);
                    }
                }
            }
        }

        final List<Property> list = new ArrayList<>();
        methodMap.forEach((propertyName, methods) -> {
            if (methods.size() >= 2) {
                // Find the get method.
                Method getMethod = null;
                for (final Method method : methods) {
                    if (isGetter(method)) {
                        getMethod = method;
                        break;
                    }
                }

                if (getMethod != null) {
                    // Find the set method.
                    Method setMethod = null;
                    for (final Method method : methods) {
                        if (isSetter(method) && method.getParameterTypes()[0].equals(getMethod.getReturnType())) {
                            setMethod = method;
                            break;
                        }
                    }

                    if (setMethod != null) {
                        Property exportProperty;
                        final ExternalFile externalFile = getMethod.getAnnotation(ExternalFile.class);
                        if (externalFile != null) {
                            final Class<?> extensionProvider = externalFile.extensionProvider();
                            if (ExtensionProvider.class.isAssignableFrom(extensionProvider)) {
                                ExtensionProvider instance;
                                try {
                                    instance = (ExtensionProvider) extensionProvider.getConstructor().newInstance();
                                } catch (final NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) {
                                    throw new RuntimeException(e.getMessage(), e);
                                }
                                exportProperty = new Property(propertyName, true, instance, getMethod, setMethod);
                            } else {
                                exportProperty = new Property(propertyName, true, new ExtensionProvider(externalFile.value()), getMethod, setMethod);
                            }
                        } else {
                            exportProperty = new Property(propertyName, false, null, getMethod, setMethod);
                        }

                        list.add(exportProperty);
                    }
                }
            }
        });
        list.sort(Comparator.comparing(Property::getName));

        final Iterator<Property> itr = list.iterator();

        while (itr.hasNext()) {
            final Property next = itr.next();
            final String name = next.getName();
            // Handle private properties Which could be pXxxx or pxxxxx
            if (name.startsWith("p") || name.startsWith("P")) {
                final String other1 = name.substring(1);
                final String other2 = other1.substring(0, 1).toLowerCase() + other1.substring(1);

                boolean found = false;
                for (final Property prop : list) {
                    if (prop.getName().equals(other1) || prop.getName().equals(other2)) {
                        found = true;
                        break;
                    }
                }
                if (found) {
                    itr.remove();
                }
            }
            if (name.equals("folder")) {
                itr.remove();
            }
        }

        return list;
    }
Given a class return all the property names.
stroom-legacy/stroom-legacy-impex_6_1/src/main/java/stroom/legacy/impex_6_1/BeanPropertyUtil.java