use of com.intellij.util.xmlb.SerializationFilterBase in project intellij-community by JetBrains.
the class LoggerInitializedWithForeignClassInspectionBase method writeSettings.
@Override
public void writeSettings(@NotNull Element element) throws WriteExternalException {
loggerClassName = formatString(loggerFactoryClassNames);
loggerFactoryMethodName = formatString(loggerFactoryMethodNames);
XmlSerializer.serializeInto(this, element, new SerializationFilterBase() {
@Override
protected boolean accepts(@NotNull Accessor accessor, @NotNull Object bean, @Nullable Object beanValue) {
if ("loggerClassName".equals(accessor.getName()) && DEFAULT_LOGGER_CLASS_NAMES.equals(beanValue)) {
return false;
}
if ("loggerFactoryMethodNames".equals(accessor.getName()) && DEFAULT_FACTORY_METHOD_NAMES.equals(beanValue)) {
return false;
}
return true;
}
});
}
Aggregations