void (@NotNull Element element) { if (myExternalizers.isEmpty()) { return; } List<AbstractProperty> properties = new ArrayList<>(myExternalizers.keySet()); properties.sort(AbstractProperty.NAME_COMPARATOR); for (AbstractProperty property : properties) { Externalizer externalizer = myExternalizers.get(property); if (externalizer == null) { continue; } Object propValue = property.get(this); if (!Comparing.equal(propValue, property.getDefault(this))) { Element child = new Element(property.getName()); externalizer.writeValue(child, propValue); if (!JDOMUtil.isEmpty(child)) { element.addContent(child); } } } }