Element () { CodeStyleScheme currentScheme = getCurrentScheme(); CURRENT_SCHEME_NAME = currentScheme == null ? null : currentScheme.getName(); return XmlSerializer.serialize(this, new SerializationFilter() { @Override public boolean accepts(@NotNull Accessor accessor, @NotNull Object bean) { if ("CURRENT_SCHEME_NAME".equals(accessor.getName())) { return !CodeStyleScheme.DEFAULT_SCHEME_NAME.equals(accessor.read(bean)); } else { return accessor.getValueClass().equals(String.class); } } }); }