void (final Element element) { for (final ExcludeEntryDescription description : getExcludeEntryDescriptions()) { if (description.isFile()) { Element entry = new Element(FILE); entry.setAttribute(URL, description.getUrl()); element.addContent(entry); } else { Element entry = new Element(DIRECTORY); entry.setAttribute(URL, description.getUrl()); entry.setAttribute(INCLUDE_SUBDIRECTORIES, Boolean.toString(description.isIncludeSubdirectories())); element.addContent(entry); } } }