boolean (@NotNull FileNameMatcher matcher, @NotNull Element mapping) { if (matcher instanceof ExtensionFileNameMatcher) { mapping.setAttribute(ATTRIBUTE_EXT, ((ExtensionFileNameMatcher)matcher).getExtension()); } else if (matcher instanceof WildcardFileNameMatcher) { mapping.setAttribute(ATTRIBUTE_PATTERN, ((WildcardFileNameMatcher)matcher).getPattern()); } else if (matcher instanceof ExactFileNameMatcher) { mapping.setAttribute(ATTRIBUTE_PATTERN, ((ExactFileNameMatcher)matcher).getFileName()); } else { return false; } return true; }